File tree 1 file changed +6
-5
lines changed 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -85,13 +85,14 @@ module.exports = function toSVG(gd, format) {
85
85
. appendChild ( geoFramework . node ( ) ) ;
86
86
}
87
87
88
- // now that we've got the 3d images in the right layer, add top items above them
89
- // assumes everything in toppaper is a group, and if it's empty (like hoverlayer)
90
- // we can ignore it
88
+ // now that we've got the 3d images in the right layer,
89
+ // add top items above them assumes everything in toppaper is either
90
+ // a group or a defs, and if it's empty (like hoverlayer) we can ignore it.
91
91
if ( fullLayout . _toppaper ) {
92
+ var nodes = fullLayout . _toppaper . node ( ) . childNodes ;
92
93
93
-
94
- var topGroups = fullLayout . _toppaper . node ( ) . childNodes ;
94
+ // make copy of nodes as childNodes prop gets mutated in loop below
95
+ var topGroups = Array . prototype . slice . call ( nodes ) ;
95
96
96
97
for ( i = 0 ; i < topGroups . length ; i ++ ) {
97
98
var topGroup = topGroups [ i ] ;
You can’t perform that action at this time.
0 commit comments