Commit 78f2ae61 authored by Xiaowu Zhang's avatar Xiaowu Zhang

add setAction method to animation gadget

parent b664151b
......@@ -15,6 +15,13 @@
})
.declareMethod('stopAnimation', function () {
this.animation.stop();
})
.declareMethod('setAction', function (type, Action) {
var that = this;
that.canvas[type] = function () {
Action.call(that);
that.showAnimation();
};
});
gk.ready(function (g) {
g.canvas = g.__element.getElementsByTagName('canvas')[0];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment