Skip to content

Commit 09eb1d0

Browse files
committed
Improve code style in the plot routine of image traces
1 parent 130593e commit 09eb1d0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/traces/image/plot.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,15 +193,15 @@ module.exports = function plot(gd, plotinfo, cdimage, imageLayer) {
193193
canvas = drawMagnifiedPixelsOnCanvas(function(i, j) {
194194
var index = 4 * (j * w + i);
195195
return [
196-
data[index + 0],
196+
data[index],
197197
data[index + 1],
198198
data[index + 2],
199199
data[index + 3]
200200
];
201201
});
202202
}
203203
var href = canvas.toDataURL('image/png');
204-
var displayImage = d3.select(image3[0][0]);
204+
var displayImage = d3.select(image3.node());
205205
sizeImage(displayImage);
206206
displayImage.attr('xlink:href', href);
207207
}

0 commit comments

Comments
 (0)