Skip to content

Commit 9055503

Browse files
Made pixelToData shorter
1 parent d70f4e9 commit 9055503

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/components/shapes/helpers.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,7 @@ exports.getPixelToData = function(gd, axis, isVertical, opt) {
9393
if(opt === 'domain') {
9494
pixelToData = function(p) {
9595
var q = (p - axis._offset) / axis._length;
96-
return ((isVertical ?
97-
(1 - q) :
98-
q));
96+
return isVertical ? 1 - q : q;
9997
};
10098
} else {
10199
var r2d = exports.rangeToShapePosition(axis);

0 commit comments

Comments
 (0)