diff options
author | Pushkar Joshi | 2012-05-31 17:16:21 -0700 |
---|---|---|
committer | Pushkar Joshi | 2012-05-31 17:16:21 -0700 |
commit | 8915a7109d918a2e69b0999ebaa2deb84811fef8 (patch) | |
tree | 19a8af74c58c9ea261f0842f36efdab959be3256 /js/components/layout/tool-button.reel | |
parent | eea0a556e44c2b60d3aaf6e46d2432d3e6303812 (diff) | |
parent | 06b609df1ff7833592faddbd8d7abb5b9f15a74d (diff) | |
download | ninja-8915a7109d918a2e69b0999ebaa2deb84811fef8.tar.gz |
Merge branch 'pentool' into brushtool
Diffstat (limited to 'js/components/layout/tool-button.reel')
-rwxr-xr-x | js/components/layout/tool-button.reel/tool-button.html | 4 | ||||
-rwxr-xr-x | js/components/layout/tool-button.reel/tool-button.js | 11 |
2 files changed, 4 insertions, 11 deletions
diff --git a/js/components/layout/tool-button.reel/tool-button.html b/js/components/layout/tool-button.reel/tool-button.html index 84a6d34e..a329f646 100755 --- a/js/components/layout/tool-button.reel/tool-button.html +++ b/js/components/layout/tool-button.reel/tool-button.html | |||
@@ -16,6 +16,10 @@ | |||
16 | "prototype": "js/components/layout/tool-button.reel", | 16 | "prototype": "js/components/layout/tool-button.reel", |
17 | "properties": { | 17 | "properties": { |
18 | "element": {"#": "toolBarButton"} | 18 | "element": {"#": "toolBarButton"} |
19 | }, | ||
20 | "bindings": { | ||
21 | "selected": {"<<->": "@owner.data.selected"}, | ||
22 | "subselected": {"<-": "@owner.data.subtools.selected"} | ||
19 | } | 23 | } |
20 | } | 24 | } |
21 | } | 25 | } |
diff --git a/js/components/layout/tool-button.reel/tool-button.js b/js/components/layout/tool-button.reel/tool-button.js index 6cea0dc3..6008c4ec 100755 --- a/js/components/layout/tool-button.reel/tool-button.js +++ b/js/components/layout/tool-button.reel/tool-button.js | |||
@@ -48,19 +48,8 @@ exports.ToolButton = Montage.create(Component, { | |||
48 | this.element.addEventListener("mousedown", this, false); | 48 | this.element.addEventListener("mousedown", this, false); |
49 | this.element.addEventListener("dblclick", this, false); | 49 | this.element.addEventListener("dblclick", this, false); |
50 | 50 | ||
51 | Object.defineBinding(this, "selected", { | ||
52 | boundObject: this.data, | ||
53 | boundObjectPropertyPath: "selected", | ||
54 | oneway: false | ||
55 | }); | ||
56 | |||
57 | if(this.data.container) { | 51 | if(this.data.container) { |
58 | this.element.title = this.data.subtools[this._subselected].toolTip; | 52 | this.element.title = this.data.subtools[this._subselected].toolTip; |
59 | Object.defineBinding(this, "subselected", { | ||
60 | boundObject: this.data.subtools, | ||
61 | boundObjectPropertyPath: "selected", | ||
62 | oneway: true | ||
63 | }); | ||
64 | } | 53 | } |
65 | 54 | ||
66 | this.element.classList.add(this.data.id) | 55 | this.element.classList.add(this.data.id) |