Bug 1210632 - Move the pointer to (0,0) with the New Measure Tool r=pbro
☠☠ backed out by 8467a81a2b5b ☠ ☠
authorShounak <shounak.bhandekar@gmail.com>
Sat, 30 Dec 2017 21:41:53 +0530
changeset 450329 2c9fc232f3cae5a3c9f6cddac1848eb551167a19
parent 450328 da8ba47df0fc7b1de810ab0a0d82a703e0729e89
child 450330 640496b6e7c02d719eeadf8f2fc816a2e3a31157
push id8527
push userCallek@gmail.com
push dateThu, 11 Jan 2018 21:05:50 +0000
treeherdermozilla-beta@95342d212a7a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspbro
bugs1210632
milestone59.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1210632 - Move the pointer to (0,0) with the New Measure Tool r=pbro MozReview-Commit-ID: 7XhSGD1QbiA
devtools/server/actors/highlighters/measuring-tool.js
--- a/devtools/server/actors/highlighters/measuring-tool.js
+++ b/devtools/server/actors/highlighters/measuring-tool.js
@@ -514,18 +514,18 @@ MeasuringToolHighlighter.prototype = {
         break;
       case "mousemove":
         ({ scrollX, scrollY, innerWidth, innerHeight } = this.env.window);
         x = event.clientX + scrollX;
         y = event.clientY + scrollY;
 
         let { coords } = this;
 
-        x = Math.min(innerWidth + scrollX - 1, Math.max(0 + scrollX, x));
-        y = Math.min(innerHeight + scrollY, Math.max(1 + scrollY, y));
+        x = Math.min(innerWidth + scrollX, Math.max(scrollX, x));
+        y = Math.min(innerHeight + scrollY, Math.max(scrollY, y));
 
         this.setSize(x - coords.x, y - coords.y);
 
         let type = this._isDragging ? "size" : "position";
 
         this.showLabel(type);
         break;
       case "mouseleave":