-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
replace prepend() calls since they aren't supported in IE11 #3491
Conversation
@etpinard The failing example provided by @wbrgss was tested to work under IE11 on Windows 10 by using the build from the current branch: https://plnkr.co/edit/SDQf3lmpKgltoTEoNYW8?p=preview |
src/components/modebar/modebar.js
Outdated
@@ -88,7 +88,9 @@ proto.update = function(graphInfo, buttons) { | |||
} | |||
|
|||
if(fullLayout.modebar.orientation === 'v') { | |||
this.element.prepend(logoGroup); | |||
d3.select(this.element).insert(function() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm. Does
d3.select(this.element).insert(logoGroup, ':first-child');
work also?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ha right, does
d3.select(this.element).insert(d3.select(logoGroup), ':first-child');
work?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool. Thanks for checking!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Non- 🚫, but at that point the vanilla solution seems simpler:
plotly.js/src/plot_api/subroutines.js
Line 148 in ea7941b
pgNode.insertBefore(plotgroupBg.node(), pgNode.childNodes[0]); |
plotly.js/src/lib/svg_text_utils.js
Lines 105 to 106 in ea7941b
newSvg.node().insertBefore(_glyphDefs.node().cloneNode(true), | |
newSvg.node().firstChild); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @alexcjohnson! I agree it is simpler. Done in commit 4b164a2
Updated demo https://plnkr.co/edit/3Rfo4svtr6PUDCiCRM3l?p=preview
Nicely done 💃 ! |
💃 (bis). Nice job! |
Fixes #3489