Template:Canvas Widget Style Template
Jump to navigation
Jump to search
DefaultStyle.widgets.mywidget = {
new: func(parent, cfg){
me._root = parent.createChild("group", "mywidget");
},
setSize: func(model, w, h){
# ...
# code for changing size
# ...
return me;
},
update: func(model){}
# other APIs below, e.g., setBackground()
};