Blog post preview
November 12, 2015

Announcement: getTransformToElement() polyfill

Unfortunately, a new version of Chrome (48) removes a feature that is core to JointJS/JointJS+. This feature is the SVGGraphicsElement.getTransformToElement()function. The motivation behind removing the method is - according to the Chrome team - open issues about how this method is supposed to behave.

To overcome compatibility issues with future versions of Chrome, we prepared a polyfill that makes sure this method exists. Before a new version of JointJS/JointJS+ is released (or if you, for any reason, don't want to upgrade), include the following code before you load your application JavaScript:

SVGElement.prototype.getTransformToElement = SVGElement.prototype.getTransformToElement ||        function(toElement) {

  return toElement.getScreenCTM().inverse().multiply(this.getScreenCTM());

};

Thanks!

Authors
Blog post author
David Durman
Serial entrepreneur, three-time father and a big believer in No-Code/Low-Code technologies.
No items found.
Stay in the loop

Speed up your development with a powerful library