8000 also key and sort subplot images · plotly/plotly.js@58c69e9 · GitHub
[go: up one dir, main page]

Skip to content

Commit 58c69e9

Browse files
committed
also key and sort subplot images
1 parent 5b94536 commit 58c69e9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/components/images/draw.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ module.exports = function draw(gd) {
242242
var imagesOnSubplot = subplotObj.imagelayer.selectAll('image')
243243
// even if there are no images on this subplot, we need to run
244244
// enter and exit in case there were previously
245-
.data(imageDataSubplot[subplot] || []);
245+
.data(imageDataSubplot[subplot] || [], imgDataFunc);
246246

247247
imagesOnSubplot.enter().append('image');
248248
imagesOnSubplot.exit().remove();
@@ -251,5 +251,6 @@ module.exports = function draw(gd) {
251251
setImage.bind(this)(d);
252252
applyAttributes.bind(this)(d);
253253
});
254+
imagesOnSubplot.sort(imgSort);
254255
}
255256
};

0 commit comments

Comments
 (0)
0