diff options
author | Eric Guzman | 2012-05-02 17:00:09 -0700 |
---|---|---|
committer | Eric Guzman | 2012-05-02 17:00:09 -0700 |
commit | a447eaf48ffbaea89cbb229f06e8b5a7e199f77f (patch) | |
tree | 05c410e22551bd5faf672ad81d52ef1b4d81444a /js/panels/css-panel/rule-components | |
parent | 8bea1e0807f36595d762592c030d4810396ada85 (diff) | |
download | ninja-a447eaf48ffbaea89cbb229f06e8b5a7e199f77f.tar.gz |
CSS Panel - Added element highlight on selector field hover
Diffstat (limited to 'js/panels/css-panel/rule-components')
-rw-r--r-- | js/panels/css-panel/rule-components/css-style-rule.reel/css-style-rule.js | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/js/panels/css-panel/rule-components/css-style-rule.reel/css-style-rule.js b/js/panels/css-panel/rule-components/css-style-rule.reel/css-style-rule.js index cfa3e605..7a6a3957 100644 --- a/js/panels/css-panel/rule-components/css-style-rule.reel/css-style-rule.js +++ b/js/panels/css-panel/rule-components/css-style-rule.reel/css-style-rule.js | |||
@@ -85,7 +85,20 @@ exports.CssStyleRule = Montage.create(Component, { | |||
85 | } | 85 | } |
86 | } | 86 | } |
87 | }, | 87 | }, |
88 | 88 | handleMouseover: { | |
89 | value: function(e) { | ||
90 | if(this.focusDelegate) { | ||
91 | this.focusDelegate.handleSelectorHover(this.selectorField.value, 'over'); | ||
92 | } | ||
93 | } | ||
94 | }, | ||
95 | handleMouseout: { | ||
96 | value: function(e) { | ||
97 | if(this.focusDelegate) { | ||
98 | this.focusDelegate.handleSelectorHover(this.selectorField.value, 'out'); | ||
99 | } | ||
100 | } | ||
101 | }, | ||
89 | update: { | 102 | update: { |
90 | value: function() { | 103 | value: function() { |
91 | if(this.cssText !== this.rule.cssText) { | 104 | if(this.cssText !== this.rule.cssText) { |
@@ -107,11 +120,12 @@ exports.CssStyleRule = Montage.create(Component, { | |||
107 | this.declarationComponent.type = 'inline'; | 120 | this.declarationComponent.type = 'inline'; |
108 | } else { | 121 | } else { |
109 | this.selectorField.addEventListener('change', this, false); | 122 | this.selectorField.addEventListener('change', this, false); |
123 | this.selectorField.element.addEventListener('mouseover', this, false); | ||
124 | this.selectorField.element.addEventListener('mouseout', this, false); | ||
110 | } | 125 | } |
111 | //console.log("css style rule : prepare for draw"); | ||
112 | |||
113 | } | 126 | } |
114 | }, | 127 | }, |
128 | |||
115 | willDraw : { | 129 | willDraw : { |
116 | value: function() { | 130 | value: function() { |
117 | if(this.applied) { | 131 | if(this.applied) { |