diff options
author | hwc487 | 2012-04-19 13:01:43 -0700 |
---|---|---|
committer | hwc487 | 2012-04-19 13:01:43 -0700 |
commit | e6a20fe64574763483dc602bd759278ccf5e5e68 (patch) | |
tree | 69defe7200206f0257fe90697136fadef59d521e /js/tools/FillTool.js | |
parent | ae7eb87564632ce7c676bd728b8ff2710ff0bb83 (diff) | |
parent | 9284c19f076dec3b47ece7dc7bcd22d74e4246c3 (diff) | |
download | ninja-e6a20fe64574763483dc602bd759278ccf5e5e68.tar.gz |
Merge branch 'master' of github.com:Motorola-Mobility/ninja-internal into Textures
Conflicts:
js/lib/drawing/world.js
js/lib/geom/geom-obj.js
js/lib/rdge/materials/cloud-material.js
js/lib/rdge/materials/deform-material.js
js/lib/rdge/materials/flat-material.js
js/lib/rdge/materials/material.js
js/lib/rdge/materials/pulse-material.js
js/lib/rdge/materials/relief-tunnel-material.js
js/lib/rdge/materials/square-tunnel-material.js
js/lib/rdge/materials/star-material.js
js/lib/rdge/materials/taper-material.js
js/lib/rdge/materials/tunnel-material.js
js/lib/rdge/materials/twist-material.js
js/lib/rdge/materials/twist-vert-material.js
js/lib/rdge/materials/uber-material.js
js/lib/rdge/materials/water-material.js
js/lib/rdge/materials/z-invert-material.js
Diffstat (limited to 'js/tools/FillTool.js')
-rwxr-xr-x | js/tools/FillTool.js | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/js/tools/FillTool.js b/js/tools/FillTool.js index 4b07ae83..746f20cf 100755 --- a/js/tools/FillTool.js +++ b/js/tools/FillTool.js | |||
@@ -17,11 +17,12 @@ var Montage = require("montage/core/core").Montage, | |||
17 | exports.FillTool = Montage.create(ModifierToolBase, { | 17 | exports.FillTool = Montage.create(ModifierToolBase, { |
18 | _canSnap: { value: false }, | 18 | _canSnap: { value: false }, |
19 | _canColor: { value: true }, | 19 | _canColor: { value: true }, |
20 | _targetedElement: { value: null }, | ||
20 | 21 | ||
21 | HandleMouseMove: { | 22 | HandleMouseMove: { |
22 | value : function (event) | 23 | value : function (event) |
23 | { | 24 | { |
24 | var obj = this.application.ninja.stage.GetElement(event); | 25 | var obj = this.application.ninja.stage.GetSelectableElement(event); |
25 | var cursor = "url('images/cursors/fill.png') 14 14, default"; | 26 | var cursor = "url('images/cursors/fill.png') 14 14, default"; |
26 | var canColor = true; | 27 | var canColor = true; |
27 | if (obj) | 28 | if (obj) |
@@ -31,6 +32,23 @@ exports.FillTool = Montage.create(ModifierToolBase, { | |||
31 | { | 32 | { |
32 | cursor = "url('images/cursors/nofill.png') 14 14, default"; | 33 | cursor = "url('images/cursors/nofill.png') 14 14, default"; |
33 | canColor = false; | 34 | canColor = false; |
35 | if(this._targetedElement) | ||
36 | { | ||
37 | this._targetedElement.classList.remove("active-element-outline"); | ||
38 | this._targetedElement = null; | ||
39 | } | ||
40 | } | ||
41 | else | ||
42 | { | ||
43 | if (obj !== this._targetedElement) | ||
44 | { | ||
45 | if(this._targetedElement) | ||
46 | { | ||
47 | this._targetedElement.classList.remove("active-element-outline"); | ||
48 | } | ||
49 | } | ||
50 | this._targetedElement = obj; | ||
51 | this._targetedElement.classList.add("active-element-outline"); | ||
34 | } | 52 | } |
35 | } | 53 | } |
36 | this.application.ninja.stage.drawingCanvas.style.cursor = cursor; | 54 | this.application.ninja.stage.drawingCanvas.style.cursor = cursor; |