summaryrefslogtreecommitdiff
path: root/js/tool.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/tool.js')
-rw-r--r--js/tool.js23
1 files changed, 20 insertions, 3 deletions
diff --git a/js/tool.js b/js/tool.js
index 719e044..807b645 100644
--- a/js/tool.js
+++ b/js/tool.js
@@ -35,10 +35,27 @@ var Checkbox = Tool.extend({
}
})
-var HiddenCheckbox = Tool.extend({
+var BlurredCheckbox = Checkbox.extend({
+ focus: function(){
+ this.use()
+ if (this.name != 'shader') { cursor_input.focus() }
+ }
+})
+
+var BlurredTool = Tool.extend({
+ focus: function(){
+ this.use()
+ if (this.name != 'shader') { cursor_input.focus() }
+ }
+})
+
+var HiddenCheckbox = BlurredCheckbox.extend({
init: function (span){
- this.__init(span)
- var state = this.name[0] == "o"
+ this.el = span
+ this.lex = new Lex (span)
+ this.name = span.innerHTML
+ this.span = span
+ var state = this.name[0] == "o"
this.update(state)
},
update: function(state){