1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
var LightControl = View.extend({
el: ".lightcontrol",
events: {
"mousedown": "stopPropagation",
},
toggle: function(state){
this.$el.toggleClass("active", state);
// toggle the class that makes the cursor a paintbucket
// $("body").removeClass("pastePaper");
},
show: function(){
this.toggle(true)
},
hide: function(){
this.toggle(false)
},
/*
$("#shadow-control").on({
mousedown: function(){ app.dragging = true },
change: function(){
var hex = (~~($(this).int() / 100 * 0xff)).toString(10)
if (hex.length == 1) hex = "0" + hex;
var color = "rgba(" + [hex, hex, hex, "1.0"] + ")"
$(".face").css("border-color", color)
}
})
$("#brightness-control").on({
mousedown: function(){ app.dragging = true },
change: function(){
var hex = (~~($(this).int() / 100 * 0xff)).toString(10)
var color = "rgba(" + [hex, hex, hex, "0.9"] + ")"
$("body,.face").css("background-color", color)
}
})
*/
})
|