Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chrome 48 removes SVGGraphicsElement.getTransformToElement() #202

Closed
ojha-ravi opened this issue Dec 7, 2015 · 8 comments · Fixed by fieldtrip/fieldtrip#1101
Closed

Comments

@ojha-ravi
Copy link

Unfortunately the most recent beta version of chrome (48.0.2564.23) removes SVGElement.prototype.getTransformToElement which is used when creating edges.

The motivation behind removing this feature can be found here with the actual Google Chrome issue tracking this here

Therefore using dagre-d3 in this latest beta version of Chrome throws errors like:

TypeError: elem.getTransformToElement is not a function(…)

As suggested by the JointJS team this function can be poly-filled where it is required. We are working around this locally with a polyfil for now, but it clearly would be better for dagre-d3 to centralise a fix (polyfil or otherwise) so that everyone using Chrome 48 can benefit.

Any thoughts on how best to fix this in dagre-d3?

@ojha-ravi ojha-ravi changed the title Chrome 48 removes SVGElement.prototype.getTransformToElement Chrome 48 removes SVGGraphicsElement.getTransformToElement() Dec 7, 2015
@myitcv
Copy link

myitcv commented Dec 9, 2015

As an example of the impact of this, here is a screenshot of the sentence tokenisation demo in Version 48.0.2564.23 beta (64-bit):

screen shot 2015-12-09 at 11 25 22

@robhobbes
Copy link

@rbojha, can you post the polyfill you are using? Are you using the same polyfill that JointJS posted?

@ojha-ravi
Copy link
Author

yes @robhobbes, we are using the same polyfill as JointJs Team posted..

SVGElement.prototype.getTransformToElement = SVGElement.prototype.getTransformToElement || function(elem) {
    return elem.getScreenCTM().inverse().multiply(this.getScreenCTM());
};

@cpettitt
Copy link
Collaborator

This should be fixed in 0.4.13 (verified on Chrome 48). If you see any issues please open a new issue. Thanks.

andrewor14 pushed a commit to andrewor14/dagre-d3 that referenced this issue Jan 29, 2016
Apparently chrome removed SVGElement.prototype.getTransformToElement,
which is used by dagre-d3 when creating edges. This commit is taken
from a fix in the main repo:
dagrejs@1ef067f

dagrejs#202
asfgit pushed a commit to apache/spark that referenced this issue Jan 30, 2016
Apparently chrome removed `SVGElement.prototype.getTransformToElement`, which is used by our JS library dagre-d3 when creating edges. The real diff can be found here: andrewor14/dagre-d3@7d6c000, which is taken from the fix in the main repo: dagrejs/dagre-d3@1ef067f

Upstream issue: dagrejs/dagre-d3#202

Author: Andrew Or <andrew@databricks.com>

Closes #10986 from andrewor14/fix-dag-viz.

(cherry picked from commit 70e69fc)
Signed-off-by: Andrew Or <andrew@databricks.com>
asfgit pushed a commit to apache/spark that referenced this issue Jan 30, 2016
Apparently chrome removed `SVGElement.prototype.getTransformToElement`, which is used by our JS library dagre-d3 when creating edges. The real diff can be found here: andrewor14/dagre-d3@7d6c000, which is taken from the fix in the main repo: dagrejs/dagre-d3@1ef067f

Upstream issue: dagrejs/dagre-d3#202

Author: Andrew Or <andrew@databricks.com>

Closes #10986 from andrewor14/fix-dag-viz.

(cherry picked from commit 70e69fc)
Signed-off-by: Andrew Or <andrew@databricks.com>
asfgit pushed a commit to apache/spark that referenced this issue Jan 30, 2016
Apparently chrome removed `SVGElement.prototype.getTransformToElement`, which is used by our JS library dagre-d3 when creating edges. The real diff can be found here: andrewor14/dagre-d3@7d6c000, which is taken from the fix in the main repo: dagrejs/dagre-d3@1ef067f

Upstream issue: dagrejs/dagre-d3#202

Author: Andrew Or <andrew@databricks.com>

Closes #10986 from andrewor14/fix-dag-viz.

(cherry picked from commit 70e69fc)
Signed-off-by: Andrew Or <andrew@databricks.com>
asfgit pushed a commit to apache/spark that referenced this issue Jan 30, 2016
Apparently chrome removed `SVGElement.prototype.getTransformToElement`, which is used by our JS library dagre-d3 when creating edges. The real diff can be found here: andrewor14/dagre-d3@7d6c000, which is taken from the fix in the main repo: dagrejs/dagre-d3@1ef067f

Upstream issue: dagrejs/dagre-d3#202

Author: Andrew Or <andrew@databricks.com>

Closes #10986 from andrewor14/fix-dag-viz.
@jrgleason
Copy link
Contributor

Wow so the justification for removing this from Chrome was it is too difficult to fix the issues? That sounds like a crappy reason what am I missing?

@nanchenchen
Copy link

Some notes for people encountering this issue: I also encountered this issue in v0.4.10, and I tried v0.4.13 and found the dagre-d3/dist/dagre-d3.core.js is missing from that version. It turns out that v0.4.17 works for the current version of Chrome.

ghost pushed a commit to splicemachine/spark that referenced this issue Mar 11, 2016
Apparently chrome removed `SVGElement.prototype.getTransformToElement`, which is used by our JS library dagre-d3 when creating edges. The real diff can be found here: andrewor14/dagre-d3@7d6c000, which is taken from the fix in the main repo: dagrejs/dagre-d3@1ef067f

Upstream issue: dagrejs/dagre-d3#202

Author: Andrew Or <andrew@databricks.com>

Closes apache#10986 from andrewor14/fix-dag-viz.

(cherry picked from commit 70e69fc)
Signed-off-by: Andrew Or <andrew@databricks.com>
openstack-gerrit pushed a commit to openstack/vitrage-dashboard that referenced this issue Mar 13, 2016
dagrejs/dagre-d3#202

Change-Id: Ic9450e8eef55af2778e2cea571f6e174841d5f43
kuychaco added a commit to relentlessbreakfast/constellation that referenced this issue Mar 16, 2016
dagrejs/dagre-d3#202
>  Chrome 48 removes SVGElement.prototype.getTransformToElement which is used when creating edges
@stephenpascoe
Copy link

After deploying this fix I notice these warnings suggesting tooltips will break shortly:

tipsy.js:30 'SVGElement.offsetWidth' is deprecated and will be removed in M50, around April 2016. See https://www.chromestatus.com/features/5724912467574784 for more details.
tipsy.js:31 'SVGElement.offsetHeight' is deprecated and will be removed in M50, around April 2016. See https://www.chromestatus.com/features/5724912467574784 for more details.

@davidgilbertson
Copy link

@jrgleason if you're interested, it's been removed from the SVG spec, it's not just Chrome removing a feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants