diff options
author | hwc487 | 2012-04-13 11:52:13 -0700 |
---|---|---|
committer | hwc487 | 2012-04-13 11:52:13 -0700 |
commit | 4f2fb5764703cab4ce3ada719b1395ed1e2f3b7c (patch) | |
tree | 3dc2e3c5a041179eed38eab1a00f851554e50005 /js/tools/InkBottleTool.js | |
parent | 521df0ed9242efff45715998837068c87aca7efd (diff) | |
parent | 4b900ea5cd6bb77eb30cec8c03b9ec9fa662c1e9 (diff) | |
download | ninja-4f2fb5764703cab4ce3ada719b1395ed1e2f3b7c.tar.gz |
Merge branch 'master' of github.com:Motorola-Mobility/ninja-internal into Snapping_II
Conflicts:
js/helper-classes/3D/view-utils.js
js/panels/presets/animations-presets.reel/animations-presets.js
js/panels/presets/style-presets.reel/style-presets.js
js/panels/presets/transitions-presets.reel/transitions-presets.js
js/tools/Translate3DToolBase.js
Diffstat (limited to 'js/tools/InkBottleTool.js')
-rwxr-xr-x | js/tools/InkBottleTool.js | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/js/tools/InkBottleTool.js b/js/tools/InkBottleTool.js index 8340ef50..95c2e71d 100755 --- a/js/tools/InkBottleTool.js +++ b/js/tools/InkBottleTool.js | |||
@@ -11,11 +11,12 @@ var Montage = require("montage/core/core").Montage, | |||
11 | exports.InkBottleTool = Montage.create(ModifierToolBase, { | 11 | exports.InkBottleTool = Montage.create(ModifierToolBase, { |
12 | _canSnap: { value: false }, | 12 | _canSnap: { value: false }, |
13 | _canColor: { value: true }, | 13 | _canColor: { value: true }, |
14 | _targetedElement: { value: null }, | ||
14 | 15 | ||
15 | HandleMouseMove: { | 16 | HandleMouseMove: { |
16 | value : function (event) | 17 | value : function (event) |
17 | { | 18 | { |
18 | var obj = this.application.ninja.stage.GetElement(event); | 19 | var obj = this.application.ninja.stage.GetSelectableElement(event); |
19 | var cursor = "url('images/cursors/ink.png') 6 11, default"; | 20 | var cursor = "url('images/cursors/ink.png') 6 11, default"; |
20 | var canColor = true; | 21 | var canColor = true; |
21 | if (obj) | 22 | if (obj) |
@@ -25,7 +26,25 @@ exports.InkBottleTool = Montage.create(ModifierToolBase, { | |||
25 | { | 26 | { |
26 | cursor = "url('images/cursors/ink_no.png') 6 11, default"; | 27 | cursor = "url('images/cursors/ink_no.png') 6 11, default"; |
27 | canColor = false; | 28 | canColor = false; |
29 | if(this._targetedElement) | ||
30 | { | ||
31 | this._targetedElement.classList.remove("active-element-outline"); | ||
32 | this._targetedElement = null; | ||
33 | } | ||
28 | } | 34 | } |
35 | else | ||
36 | { | ||
37 | if (obj !== this._targetedElement) | ||
38 | { | ||
39 | if(this._targetedElement) | ||
40 | { | ||
41 | this._targetedElement.classList.remove("active-element-outline"); | ||
42 | } | ||
43 | } | ||
44 | this._targetedElement = obj; | ||
45 | this._targetedElement.classList.add("active-element-outline"); | ||
46 | } | ||
47 | |||
29 | } | 48 | } |
30 | this.application.ninja.stage.drawingCanvas.style.cursor = cursor; | 49 | this.application.ninja.stage.drawingCanvas.style.cursor = cursor; |
31 | this._canColor = canColor; | 50 | this._canColor = canColor; |