Skip to content

Commit 30f61c8

Browse files
committed
drop out of range pixel from the end
1 parent 8ed847a commit 30f61c8

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/components/fx/hover.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -1117,23 +1117,23 @@ function createHoverText(hoverData, opts, gd) {
11171117
var lx, ly; // top and left positions of the hover box
11181118

11191119
// horizontal alignment to end up on screen
1120-
if(lxRight + tWidth <= outerWidth && lxRight >= 0) {
1120+
if(lxRight + tWidth < outerWidth && lxRight >= 0) {
11211121
lx = lxRight;
1122-
} else if(lxLeft + tWidth <= outerWidth && lxLeft >= 0) {
1122+
} else if(lxLeft + tWidth < outerWidth && lxLeft >= 0) {
11231123
lx = lxLeft;
1124-
} else if(xOffset + tWidth <= outerWidth) {
1124+
} else if(xOffset + tWidth < outerWidth) {
11251125
lx = xOffset; // subplot left corner
11261126
} else {
11271127
lx = 0; // paper left corner
11281128
}
11291129
lx += HOVERTEXTPAD;
11301130

11311131
// vertical alignement to end up on screen
1132-
if(lyBottom + tHeight <= outerHeight && lyBottom >= 0) {
1132+
if(lyBottom + tHeight < outerHeight && lyBottom >= 0) {
11331133
ly = lyBottom;
1134-
} else if(lyTop + tHeight <= outerHeight && lyTop >= 0) {
1134+
} else if(lyTop + tHeight < outerHeight && lyTop >= 0) {
11351135
ly = lyTop;
1136-
} else if(yOffset + tHeight <= outerHeight) {
1136+
} else if(yOffset + tHeight < outerHeight) {
11371137
ly = yOffset; // subplot top corner
11381138
} else {
11391139
ly = 0; // paper top corner

0 commit comments

Comments
 (0)