UNPKG
@quartic/bokehjs
Version:
latest (0.12.5)
0.12.5
Interactive, novel data visualization
github.com/bokeh/bokeh
bokeh/bokeh
@quartic/bokehjs
/
src
/
coffee
/
models
/
tools
/
on_off_button.coffee
15 lines
(11 loc)
•
323 B
text/coffeescript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import
{
ButtonToolButtonView
}
from
"./button_tool"
export
class
OnOffButtonView
extends
ButtonToolButtonView
render
: () ->
super
()
if
@model
.
active
@el
.
classList
.
add
(
'bk-active'
)
else
@el
.
classList
.
remove
(
'bk-active'
)
_clicked
: () -> active =
@model
.
active
@model
.
active
= not active