File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -42,16 +42,13 @@ describe('The legend', function() {
4242 } ) ;
4343
4444 it ( 'should constrain scrolling to the contents' , function ( ) {
45- var scrollBox = legend . getElementsByClassName ( 'scrollbox' ) [ 0 ] ,
46- scrollHeight = scrollBox . getBoundingClientRect ( ) . height ,
47- legendHeight = legend . getAttribute ( 'height' ) ,
48- maxHeight = legendHeight - scrollHeight - 12 ;
45+ var scrollBox = legend . getElementsByClassName ( 'scrollbox' ) [ 0 ] ;
4946
5047 legend . dispatchEvent ( scrollTo ( - 100 ) ) ;
5148 expect ( scrollBox . getAttribute ( 'transform' ) ) . toBe ( 'translate(0, 0)' ) ;
5249
53- legend . dispatchEvent ( scrollTo ( 10000 ) ) ;
54- expect ( scrollBox . getAttribute ( 'transform' ) ) . toBe ( 'translate(0, ' + maxHeight + ' )') ;
50+ legend . dispatchEvent ( scrollTo ( 100000 ) ) ;
51+ expect ( scrollBox . getAttribute ( 'transform' ) ) . toBe ( 'translate(0, -179 )' ) ;
5552 } ) ;
5653
5754 it ( 'should scale the scrollbar movement from top to bottom' , function ( ) {
You can’t perform that action at this time.
0 commit comments