我用的是vue 放在了main.js 中 生效
=========== [ http://jointjs.com/blog/get-transform-to-element-polyfill.html ] ====================
公告:getTransformToElement()polyfill 2015年11月12日
不幸的是,新版Chrome(48)删除了JointJS / Rappid的核心功能。此功能是SVGGraphicsElement.getTransformToElement()函数。删除该方法背后的动机是 - 根据Chrome团队 - 打开有关此方法应该如何表现的问题。
为了克服未来版本Chrome的兼容性问题,我们准备了一个确保此方法存在的polyfill。在发布新版本的JointJS / Rappid之前(或者由于任何原因,您不想升级),在加载应用程序JavaScript之前包含以下代码:
SVGElement.prototype.getTransformToElement = SVGElement.prototype.getTransformToElement || function(toElement){
return toElement.getScreenCTM()。inverse()。multiply(this.getScreenCTM());
};
大卫·杜曼
===========================================================
=========== [ http://jointjs.com/blog/get-transform-to-element-polyfill.html ] ====================
Announcement: getTransformToElement() polyfill Nov 12th, 2015
Unfortunately, a new version of Chrome (48) removes a feature that is core to JointJS/Rappid. This feature is theSVGGraphicsElement.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/Rappid 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
===========================================================
---------------------
作者:kanpiaoxue
来源:CSDN
原文:https://blog.csdn.net/kanpiaoxue/article/details/84766885
版权声明:本文为博主原创文章,转载请附上博文链接!