summaryrefslogtreecommitdiff
path: root/js/tool.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/tool.js')
-rw-r--r--js/tool.js42
1 files changed, 21 insertions, 21 deletions
diff --git a/js/tool.js b/js/tool.js
index d3d40c1..3bd397c 100644
--- a/js/tool.js
+++ b/js/tool.js
@@ -1,23 +1,23 @@
var Tool = Model({
- init: function (span) {
- this.el = span
- this.lex = new Lex (span)
- this.name = span.innerHTML
- this.span = span
- },
- use: function(){},
- focus: function(){
- // focused && focused.blur()
- current_tool && current_tool.blur()
- current_tool = this
- this.span.classList.add('focused')
- this.use()
- if (this.name != 'shader') { cursor_input.focus() }
- },
- blur: function(){
- current_tool = null
- this.span.classList.remove('focused')
- }
+ init: function (span) {
+ this.el = span
+ this.lex = new Lex (span)
+ this.name = span.innerHTML
+ this.span = span
+ },
+ use: function(){},
+ focus: function(){
+ // focused && focused.blur()
+ current_tool && current_tool.blur()
+ current_tool = this
+ this.span.classList.add('focused')
+ this.use()
+ if (this.name != 'shader') { cursor_input.focus() }
+ },
+ blur: function(){
+ current_tool = null
+ this.span.classList.remove('focused')
+ }
})
var Checkbox = Tool.extend({
@@ -28,7 +28,7 @@ var Checkbox = Tool.extend({
this.update(state)
},
update: function(state){
- if (state) this.el.innerHTML = "x " + this.name
- else this.el.innerHTML = "_ " + this.name
+ if (state) this.el.innerHTML = "x " + this.name
+ else this.el.innerHTML = "_ " + this.name
}
})