Ran
|
Jobs
1
|
Files
1
|
Run time
1min
|
Badge
Embed ▾
README BADGES
|
travis-ci
Fix positioning of hoverdetail in chrome when zooming This commit changes the calculation of the current mouse position to use `MouseEvent.clientX/Y` (mouse position in relation to the viewport) and `Element.getBoundingClientRect()` (element position in relation to the viewport). `event.layerX/Y` is non-standard and seems to return different values than we are expecting if there is zooming involved in Chrome. Demo, zoom in and hover the square: https://jsfiddle.net/6gnpL75j/ An earlier commit reverted the order of layer vs offset and fixed a positioning bug in Firefox while introducing this new one in Chrome: https://github.com/shutterstock/rickshaw/commit/c81f03768 I looked around for that Firefox positioning bug in v1.6.0 which I found in: http://code.shutterstock.com/rickshaw/examples/extensions.html With this PR, both Chrome and Firefox show labels in the correct spot. More information: https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/clientX https://developer.mozilla.org/en-US/docs/Web/API/Element/getBoundingClientRect https://developer.mozilla.org/en-US/docs/Web/API/UIEvent/layerX Chromium issue: https://bugs.chromium.org/p/chromium/issues/detail?id=323518
514 of 979 branches covered (52.5%)
1178 of 1873 relevant lines covered (62.89%)
99.02 hits per line
Lines | Coverage | ∆ | File |
---|---|---|---|
171 |
62.89 |
0.02% | rickshaw.js |
ID | Job ID | Ran | Files | Coverage | |
---|---|---|---|---|---|
1 | 117.1 | 1 |
62.89 |
Travis Job 117.1 |
Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line | Branch Hits | Branch Misses |
---|