Skip to content

Commit eb9307e

Browse files
committed
rename Polar.prototype.isPtWithinSector -> isPtInside
... which is more precise and less confusing (I think)
1 parent d35d13b commit eb9307e

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/plots/polar/polar.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ proto.mockCartesianAxis = function(fullLayout, polarLayout, opts) {
337337
};
338338

339339
ax.isPtWithinRange = axId === 'x' ?
340-
function(d) { return _this.isPtWithinSector(d); } :
340+
function(d) { return _this.isPtInside(d); } :
341341
function() { return true; };
342342

343343
ax.setRange();
@@ -1192,7 +1192,7 @@ proto.updateAngularDrag = function(fullLayout, polarLayout) {
11921192
dragElement.init(dragOpts);
11931193
};
11941194

1195-
proto.isPtWithinSector = function(d) {
1195+
proto.isPtInside = function(d) {
11961196
var sector = this.sector;
11971197
var thetag = this.angularAxis.c2g(d.theta);
11981198

src/traces/scatterpolar/hover.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ function hoverPoints(pointData, xval, yval, hovermode) {
2727
var cdi = newPointData.cd[newPointData.index];
2828
var trace = newPointData.trace;
2929

30-
if(!subplot.isPtWithinSector(cdi)) return;
30+
if(!subplot.isPtInside(cdi)) return;
3131

3232
newPointData.xLabelVal = undefined;
3333
newPointData.yLabelVal = undefined;

src/traces/scatterpolargl/index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ function plot(container, subplot, cdata) {
6161

6262
// filter out by range
6363
for(i = 0; i < rArray.length; i++) {
64-
if(!subplot.isPtWithinSector({r: rArray[i], theta: thetaArray[i]})) {
64+
if(!subplot.isPtInside({r: rArray[i], theta: thetaArray[i]})) {
6565
subRArray[i] = NaN;
6666
subThetaArray[i] = NaN;
6767
}
@@ -161,7 +161,7 @@ function hoverPoints(pointData, xval, yval, hovermode) {
161161
cdi.r = rArray[newPointData.index];
162162
cdi.theta = thetaArray[newPointData.index];
163163

164-
if(!subplot.isPtWithinSector(cdi)) return;
164+
if(!subplot.isPtInside(cdi)) return;
165165

166166
newPointData.xLabelVal = undefined;
167167
newPointData.yLabelVal = undefined;

0 commit comments

Comments
 (0)