Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $.widget("bw.wijlinechartcursor", $.wijmo.wijlinechart, {
- _create: function () {
- var self = this;
- $.wijmo.wijlinechart.prototype._create.apply(self, arguments);
- self.element.on("painted", function (e) {
- alert("Got painted in child via element.on"); // Doesn't get called.
- });
- // This works, but blows away the client code's handler (below)
- self.options.painted = function (e) {
- alert("Got painted in child class via options.painted!");
- }
- },
- _painted: function () {
- alert("Got painted in child via _painted"); // Doesn't get called.
- }
- });
- $("#mywijlinechartcursor").wijlinechartcursor({
- // ... stuff...
- painted: function (e) {
- alert("Got painted in client code");
- }
- });
- self.element.on(self.widgetEventPrefix + "painted", function(e) {
- alert("Got painted in child via element.on"); // Should be called.
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement