LoginSignup
7
7

More than 5 years have passed since last update.

CreateJSのEventクラスをCoffeeScriptでextendsする

Posted at
  1. 先にinitializeを呼んでから、
  2. super()する
ExEvent.coffee
class ExEvent extends createjs.Event
  constructor: (type, @data = null, bubbles = true, cancelable = true) ->
    @initialize()
    super(type, bubbles, cancelable)

  clone: ->
    new ExEvent(@type, @data, @bubbles, @cancelable)

7
7
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
7
7