Nov 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());



David Durman