Skip to content

Commit 8589d99

Browse files
committed
no need to draw inner sector when range[0] is clamped to origin
1 parent 7f0fc26 commit 8589d99

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/plots/polar/polar.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -812,7 +812,8 @@ proto.updateMainDrag = function(fullLayout) {
812812
var cpath;
813813

814814
if(clampAndSetR0R1(rr0, rr1)) {
815-
path1 = path0 + _this.pathSector(r1) + _this.pathSector(r0);
815+
path1 = path0 + _this.pathSector(r1);
816+
if(r0) path1 += _this.pathSector(r0);
816817
// keep 'starting' angle
817818
cpath = pathCorner(r0, a0) + pathCorner(r1, a0);
818819
}
@@ -837,7 +838,8 @@ proto.updateMainDrag = function(fullLayout) {
837838
var cpath;
838839

839840
if(clampAndSetR0R1(rr0, rr1)) {
840-
path1 = path0 + _this.pathSector(r1) + _this.pathSector(r0);
841+
path1 = path0 + _this.pathSector(r1);
842+
if(r0) path1 += _this.pathSector(r0);
841843
// keep 'starting' angle here too
842844
cpath = [
843845
pathCornerForPolygons(r0, vangles0[0], vangles0[1]),

0 commit comments

Comments
 (0)