We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
legend_scroll_test
1 parent d234487 commit e89769bCopy full SHA for e89769b
1 file changed
test/jasmine/tests/legend_scroll_test.js
@@ -101,14 +101,15 @@ describe('The legend', function() {
101
var initialDataScroll = getScroll(gd);
102
var wheelDeltaY = 100;
103
var finalDataScroll = Lib.constrain(initialDataScroll +
104
- wheelDeltaY / scrollBarYMax * scrollBoxYMax,
+ ((wheelDeltaY / scrollBoxYMax) * scrollBarYMax),
105
0, scrollBoxYMax);
106
107
legend.dispatchEvent(scrollTo(wheelDeltaY));
108
-
109
- expect(getScroll(gd)).toBe(finalDataScroll);
+
+ var dataScroll = getScroll(gd);
110
+ expect(dataScroll).toBeCloseTo(finalDataScroll, 3);
111
expect(scrollBox.getAttribute('transform')).toBe(
- 'translate(0,' + -finalDataScroll + ')');
112
+ 'translate(0,' + -dataScroll + ')');
113
});
114
115
function dragScroll(element, rightClick, mainClick) {
0 commit comments