Skip to content

Commit a3d561c

Browse files
Just check that axRefType isn't range in axes.coercePosition
1 parent 35712fe commit a3d561c

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/plots/cartesian/axes.js

+3-5
Original file line numberDiff line numberDiff line change
@@ -147,19 +147,17 @@ axes.getRefType = function(ar) {
147147
* - for other types: coerce them to numbers
148148
*/
149149
axes.coercePosition = function(containerOut, gd, coerce, axRef, attr, dflt) {
150-
var cleanPos, pos, axRefType;
151-
axRefType = axes.getRefType(axRef);
152-
if(axRefType === 'paper' || axRefType === 'pixel' || axRefType === 'domain') {
150+
var cleanPos, pos;
151+
var axRefType = axes.getRefType(axRef);
152+
if(axRefType !== 'range') {
153153
cleanPos = Lib.ensureNumber;
154154
pos = coerce(attr, dflt);
155155
} else {
156-
// if axRef is 'range' or undefined we will end up here
157156
var ax = axes.getFromId(gd, axRef);
158157
dflt = ax.fraction2r(dflt);
159158
pos = coerce(attr, dflt);
160159
cleanPos = ax.cleanPos;
161160
}
162-
163161
containerOut[attr] = cleanPos(pos);
164162
};
165163

0 commit comments

Comments
 (0)