diff options
Diffstat (limited to 'js/components')
-rwxr-xr-x | js/components/menu/menu-entry.reel/menu-entry.js | 4 | ||||
-rwxr-xr-x | js/components/menu/menu-item.reel/menu-item.js | 1 | ||||
-rwxr-xr-x | js/components/menu/menu.reel/menu.js | 9 |
3 files changed, 3 insertions, 11 deletions
diff --git a/js/components/menu/menu-entry.reel/menu-entry.js b/js/components/menu/menu-entry.reel/menu-entry.js index b9c546ed..ae3469c6 100755 --- a/js/components/menu/menu-entry.reel/menu-entry.js +++ b/js/components/menu/menu-entry.reel/menu-entry.js | |||
@@ -83,7 +83,7 @@ exports.MenuEntry = Montage.create(Component, { | |||
83 | } | 83 | } |
84 | }, | 84 | }, |
85 | 85 | ||
86 | handleClick: { | 86 | captureMousedown: { |
87 | value: function(event) { | 87 | value: function(event) { |
88 | // TODO: Hack! Rework this! | 88 | // TODO: Hack! Rework this! |
89 | this.parentComponent.ownerComponent.toggleActivation(this); | 89 | this.parentComponent.ownerComponent.toggleActivation(this); |
@@ -105,7 +105,7 @@ exports.MenuEntry = Montage.create(Component, { | |||
105 | 105 | ||
106 | this.topHeaderText.innerHTML = this.data.header; | 106 | this.topHeaderText.innerHTML = this.data.header; |
107 | 107 | ||
108 | this.element.addEventListener("click", this, false); | 108 | this.element.addEventListener("mousedown", this, true); |
109 | 109 | ||
110 | Object.defineBinding(this, "menuIsActive", { | 110 | Object.defineBinding(this, "menuIsActive", { |
111 | boundObject: this._menu, | 111 | boundObject: this._menu, |
diff --git a/js/components/menu/menu-item.reel/menu-item.js b/js/components/menu/menu-item.reel/menu-item.js index f9a625a3..5ff6b024 100755 --- a/js/components/menu/menu-item.reel/menu-item.js +++ b/js/components/menu/menu-item.reel/menu-item.js | |||
@@ -137,7 +137,6 @@ exports.MenuItem = Montage.create(Component, { | |||
137 | 137 | ||
138 | captureMousedown: { | 138 | captureMousedown: { |
139 | value: function(event) { | 139 | value: function(event) { |
140 | |||
141 | if(this.data.radio && this.checked) return; | 140 | if(this.data.radio && this.checked) return; |
142 | 141 | ||
143 | if( ( this.enabled === true || this.enabled > 0 ) && (this.submenu === false) ) { | 142 | if( ( this.enabled === true || this.enabled > 0 ) && (this.submenu === false) ) { |
diff --git a/js/components/menu/menu.reel/menu.js b/js/components/menu/menu.reel/menu.js index 50d3f0bc..1560100a 100755 --- a/js/components/menu/menu.reel/menu.js +++ b/js/components/menu/menu.reel/menu.js | |||
@@ -83,19 +83,12 @@ exports.Menu = Montage.create(Component, { | |||
83 | 83 | ||
84 | handleMousedown: { | 84 | handleMousedown: { |
85 | value: function(evt) { | 85 | value: function(evt) { |
86 | |||
87 | if(this.active && (this.getZIndex(evt.target) < 9000 || evt.target.id === "topMenu")) { | 86 | if(this.active && (this.getZIndex(evt.target) < 9000 || evt.target.id === "topMenu")) { |
88 | this._activeEntry.deselect(); | 87 | this._activeEntry.deselect(); |
89 | this._activeEntry = null; | 88 | this._activeEntry = null; |
90 | this.active = false; | 89 | this.active = false; |
91 | 90 | this.element.ownerDocument.removeEventListener('mousedown', this, false); | |
92 | //console.log(this.rep.objects[1]); | ||
93 | //this.controller.content[1].header = "BLAH"; | ||
94 | } | 91 | } |
95 | |||
96 | // console.log(evt.target.style['z-index']); | ||
97 | // console.log(this.getZIndex(evt.target)); | ||
98 | |||
99 | } | 92 | } |
100 | }, | 93 | }, |
101 | 94 | ||