Skip to content

Latest commit

 

History

History
17 lines (11 loc) · 1.14 KB

File metadata and controls

17 lines (11 loc) · 1.14 KB
source https://www.jointjs.com/blog/announcement-gettransformtoelement-polyfill
generated 2026-05-06
format markdown

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!