DEFAULT_OPTIONS
. Actually, it should be a static members. It makes the code even easier to write.Here is my fixed example:
class @MyWidget extends famous.core.View DEFAULT_OPTIONS: size: [undefined, undefined] # ... Put your expected defaults here constructor: (@options) -> super @options # ... Put your remaining initialization code here
Aucun commentaire:
Enregistrer un commentaire