Tuesday, October 6, 2015
A better inheritance base class for Famo.us widget in Meteor
In former articles, I've proposed a base class for inheriting from Famo.us. There was something odd on the way I was using theDEFAULT_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
Labels:
CoffeeScript,
Famo.us,
Meteor,
Meteor.js
Location:
Paris, France
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment