Sha256: 8b39c209172964a9b0631b486edb51e3db3639f799fe9dd002f32400b9e58d86
Contents?: true
Size: 506 Bytes
Versions: 9
Compression:
Stored size: 506 Bytes
Contents
#= require modularity/modules/button # A button that counts how often it is clicked. # This is implemented as a subclass of Button, # to take advantage of the already existing functionality there. class window.modularity.CounterButton extends modularity.Button constructor: -> super # Counts how often this button has been clicked so far. @click_count = 0 # We override the event handler for the 'clicked' event here. container_clicked: => @fire_event 'clicked', ++@click_count
Version data entries
9 entries across 9 versions & 1 rubygems