Sha256: e5c6af6ce6ee544a47ae212e673c4482953e07792cab4252b76e0075e0c8b13d
Contents?: true
Size: 495 Bytes
Versions: 3
Compression:
Stored size: 495 Bytes
Contents
#= require 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
3 entries across 3 versions & 1 rubygems