Skip to content

Commit 54d2ca2

Browse files
committed
refactor - avoid long _hasClipOnAxisFalse key twice
1 parent 3e53615 commit 54d2ca2

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/plots/polar/polar.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,14 +100,15 @@ proto.plot = function(polarCalcData, fullLayout) {
100100
var _this = this;
101101
var polarLayout = fullLayout[_this.id];
102102

103-
_this._hasClipOnAxisFalse = false;
103+
var found = false;
104104
for(var i = 0; i < polarCalcData.length; i++) {
105105
var trace = polarCalcData[i][0].trace;
106106
if(trace.cliponaxis === false) {
107-
_this._hasClipOnAxisFalse = true;
107+
found = true;
108108
break;
109109
}
110110
}
111+
_this._hasClipOnAxisFalse = found;
111112

112113
_this.updateLayers(fullLayout, polarLayout);
113114
_this.updateLayout(fullLayout, polarLayout);

0 commit comments

Comments
 (0)