Skip to content

Commit 189243f

Browse files
committed
formatting
1 parent fb8d995 commit 189243f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/traces/image/plot.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -182,11 +182,11 @@ module.exports = function plot(gd, plotinfo, cdimage, imageLayer) {
182182
} else if(trace._hasSource) {
183183
if(fastImage) {
184184
href = trace.source;
185-
// Flip the SVG image as needed
186-
var axis_scale = [(xa.range[0] < xa.range[1]) ? 1 : -1, (ya.range[0] < ya.range[1]) ? -1 : 1];
185+
// Flip the SVG image as needed (around the proper center location)
186+
var axisScale = [(xa.range[0] < xa.range[1]) ? 1 : -1, (ya.range[0] < ya.range[1]) ? -1 : 1];
187187
var trans = '';
188188
trans += 'translate(' + (left + imageWidth / 2) + 'px,' + (top + imageHeight / 2) + 'px)';
189-
trans += 'scale(' + axis_scale[0] + ',' + axis_scale[1] + ')';
189+
trans += 'scale(' + axisScale[0] + ',' + axisScale[1] + ')';
190190
trans += 'translate(' + (-left - imageWidth / 2) + 'px,' + (-top - imageHeight / 2) + 'px)';
191191
localStyle += 'transform:' + trans + ';';
192192
} else {

0 commit comments

Comments
 (0)