Skip to content

Commit 229a572

Browse files
committed
Fix - correctly use central canvas defs for fill patterns
If by chance defs was created in other place, fill pattern was attached to wrong place
1 parent 605e038 commit 229a572

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/JSRootPainter.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1864,9 +1864,9 @@
18641864

18651865
var id = "pat_" + this.pattern + "_" + this.colorindx;
18661866

1867-
var defs = svg.select('defs');
1867+
var defs = svg.select('.canvas_defs');
18681868
if (defs.empty())
1869-
defs = svg.insert("svg:defs",":first-child");
1869+
defs = svg.insert("svg:defs",":first-child").attr("class","canvas_defs");
18701870

18711871
var line_color = this.color;
18721872
this.color = "url(#" + id + ")";

0 commit comments

Comments
 (0)