`
kanpiaoxue
  • 浏览: 1777419 次
  • 性别: Icon_minigender_1
  • 来自: 北京
文章分类
社区版块
存档分类
最新评论

Jointjs 在Chrome浏览器升级到v.48版本之后报错Uncaught TypeError: this.node.getTransformToEleme

 
阅读更多

[现象]

近期发现使用Chrome(版本v.48)浏览器访问dmap.xxx.com的时候发现异常情况,表现为图形界面报错,不能正常使用。

Chrome的报错信息如下:

Uncaught TypeError: this.node.getTransformToElement is not a function

[原因]

经过CDC RD同学的定位,发现Chrome v.48的版本进行大幅度的更新。其中一条更新内容如下:

原文如下:SVGGraphicsElement.getTransformToElement has been removed to match the SVG spec.

译文如下:移除了 SVGGraphicsElement.getTransformToElement,以符合 SVG 规范。

地址如下:http://blog.chromium.org/2015/12/chrome-48-beta-present-to-cast-devices_91.html

dmap.xxx.com依赖的开源SVG框架jointjs依赖于该方法的实现,所以引起程序异常,无法查看图形功能模块。

[临时解决方案]

方法1:请大家使用Chrome v.47或更低的版本来访问dmap.xxx.com

方法2:请大家使用百度浏览器来访问dmap.xxx.com

[终极解决方案]

会对jointjs框架进行升级,支持Chrome浏览器全部版本。

[终极解决方案时间]

近期对该问题进行修复,进度会在HI群中进行及时更新通知。

 

官网解决问题: http://jointjs.com/blog/get-transform-to-element-polyfill.html

谢谢!

 

=========== [ 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

===========================================================

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics