Skip to content

Commit 4b87b2e

Browse files
committed
fix #1782 (second half: arrowheads broken) - 🔪 parentElement
this must have been broken since day 1, oddly enough...
1 parent 301fba7 commit 4b87b2e

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

src/components/annotations/draw_arrow_head.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ module.exports = function drawArrowHead(el3, style, ends, mag, standoff) {
111111
function drawhead(p, rot) {
112112
if(!headStyle.path) return;
113113
if(style > 5) rot = 0; // don't rotate square or circle
114-
d3.select(el.parentElement).append('path')
114+
d3.select(el.parentNode).append('path')
115115
.attr({
116116
'class': el3.attr('class'),
117117
d: headStyle.path,

src/traces/sankey/render.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ function nodeModel(uniqueKeys, d, n) {
220220
// rendering snippets
221221

222222
function crispLinesOnEnd(sankeyNode) {
223-
d3.select(sankeyNode.node().parentElement).style('shape-rendering', 'crispEdges');
223+
d3.select(sankeyNode.node().parentNode).style('shape-rendering', 'crispEdges');
224224
}
225225

226226
function updateNodePositions(sankeyNode) {
@@ -239,7 +239,7 @@ function linkPath(d) {
239239
}
240240

241241
function updateNodeShapes(sankeyNode) {
242-
d3.select(sankeyNode.node().parentElement).style('shape-rendering', 'optimizeSpeed');
242+
d3.select(sankeyNode.node().parentNode).style('shape-rendering', 'optimizeSpeed');
243243
sankeyNode.call(updateNodePositions);
244244
}
245245

tasks/test_syntax.js

+3
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,9 @@ function assertSrcContents() {
7777
else if(lastPart === 'innerHTML') {
7878
logs.push(file + ' : contains .innerHTML (IE failure in SVG)');
7979
}
80+
else if(lastPart === 'parentElement') {
81+
logs.push(file + ' : contains .parentElement (IE failure)');
82+
}
8083
else if(node.source() === 'Math.sign') {
8184
logs.push(file + ' : contains Math.sign (IE failure)');
8285
}

0 commit comments

Comments
 (0)