daily pastebin goal
89%
SHARE
TWEET

Untitled

a guest Feb 20th, 2019 60 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $.widget("bw.wijlinechartcursor", $.wijmo.wijlinechart, {
  2.              _create: function () {
  3.                  var self = this;
  4.                  $.wijmo.wijlinechart.prototype._create.apply(self, arguments);
  5.  
  6.                  self.element.on("painted", function (e) {
  7.                      alert("Got painted in child via element.on"); // Doesn't get called.
  8.                  });
  9.  
  10.                  // This works, but blows away the client code's handler (below)
  11.                  self.options.painted = function (e) {
  12.                     alert("Got painted in child class via options.painted!");
  13.                  }                  
  14.  
  15.              },
  16.  
  17.              _painted: function () {
  18.                  alert("Got painted in child via _painted");  // Doesn't get called.
  19.              }
  20.          });
  21.  
  22.          $("#mywijlinechartcursor").wijlinechartcursor({
  23.              // ... stuff...
  24.              painted: function (e) {
  25.                  alert("Got painted in client code");
  26.              }
  27.          });
  28.    
  29. self.element.on(self.widgetEventPrefix + "painted", function(e) {
  30.     alert("Got painted in child via element.on");  // Should be called.
  31. });
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top