Skip to content

Commit 1c51d72

Browse files
Removed domainRef argument from axes.coerceRef
because it is always true wherever this is called.
1 parent 7d2129c commit 1c51d72

File tree

4 files changed

+6
-7
lines changed

4 files changed

+6
-7
lines changed

src/components/annotations/defaults.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ function handleAnnotationDefaults(annIn, annOut, fullLayout) {
4747
var axLetter = axLetters[i];
4848

4949
// xref, yref
50-
var axRef = Axes.coerceRef(annIn, annOut, gdMock, axLetter, '', 'paper', true);
50+
var axRef = Axes.coerceRef(annIn, annOut, gdMock, axLetter, '', 'paper');
5151

5252
if(axRef !== 'paper') {
5353
var ax = Axes.getFromId(gdMock, axRef);
@@ -61,7 +61,7 @@ function handleAnnotationDefaults(annIn, annOut, fullLayout) {
6161
var arrowPosAttr = 'a' + axLetter;
6262
// axref, ayref
6363
var aaxRef = Axes.coerceRef(annIn, annOut, gdMock, arrowPosAttr, 'pixel',
64-
['pixel', 'paper'], true);
64+
['pixel', 'paper']);
6565

6666
// for now the arrow can only be on the same axis or specified as pixels
6767
// TODO: sometime it might be interesting to allow it to be on *any* axis

src/components/images/defaults.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,7 @@ function imageDefaults(imageIn, imageOut, fullLayout) {
4949
for(var i = 0; i < 2; i++) {
5050
// 'paper' is the fallback axref
5151
var axLetter = axLetters[i];
52-
var axRef = Axes.coerceRef(imageIn, imageOut, gdMock, axLetter, 'paper', undefined,
53-
true);
52+
var axRef = Axes.coerceRef(imageIn, imageOut, gdMock, axLetter, 'paper', undefined);
5453

5554
if(axRef !== 'paper') {
5655
var ax = Axes.getFromId(gdMock, axRef);

src/components/shapes/defaults.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ function handleShapeDefaults(shapeIn, shapeOut, fullLayout) {
6464

6565
// xref, yref
6666
var axRef = Axes.coerceRef(shapeIn, shapeOut, gdMock, axLetter, undefined,
67-
'paper', true);
67+
'paper');
6868
var axRefType = Axes.getRefType(axRef);
6969

7070
if(axRefType === 'range') {

src/plots/cartesian/axes.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,15 +87,15 @@ function expandRange(range) {
8787
* domainRef: true if ' domain' should be appended to the axis items in the list
8888
* of possible values for this axis reference.
8989
*/
90-
axes.coerceRef = function(containerIn, containerOut, gd, attr, dflt, extraOption, domainRef) {
90+
axes.coerceRef = function(containerIn, containerOut, gd, attr, dflt, extraOption) {
9191
var axLetter = attr.charAt(attr.length - 1);
9292
var axlist = gd._fullLayout._subplots[axLetter + 'axis'];
9393
var refAttr = attr + 'ref';
9494
var attrDef = {};
9595

9696
if(!dflt) dflt = axlist[0] || (typeof extraOption === 'string' ? extraOption : extraOption[0]);
9797
if(!extraOption) extraOption = dflt;
98-
if(domainRef) axlist = axlist.concat(axlist.map(function(x) { return x + ' domain'; }));
98+
axlist = axlist.concat(axlist.map(function(x) { return x + ' domain'; }));
9999

100100
// data-ref annotations are not supported in gl2d yet
101101

0 commit comments

Comments
 (0)