@@ -389,7 +389,7 @@ describe('MinimapElement', () => {
389389 } )
390390
391391 it ( 'renders the visible gutter decorations' , ( ) => {
392- spyOn ( minimapElement , 'drawGutterDecoration' ) . andCallThrough ( )
392+ spyOn ( minimapElement . CanvasDrawer , 'drawGutterDecoration' ) . andCallThrough ( )
393393
394394 minimap . decorateMarker ( editor . markBufferRange ( [ [ 1 , 0 ] , [ 1 , 10 ] ] ) , { type : 'gutter' , color : '#0000FF' } )
395395 minimap . decorateMarker ( editor . markBufferRange ( [ [ 10 , 0 ] , [ 10 , 10 ] ] ) , { type : 'gutter' , color : '#0000FF' } )
@@ -403,8 +403,8 @@ describe('MinimapElement', () => {
403403 runs ( ( ) => {
404404 nextAnimationFrame ( )
405405
406- expect ( minimapElement . drawGutterDecoration ) . toHaveBeenCalled ( )
407- expect ( minimapElement . drawGutterDecoration . calls . length ) . toEqual ( 2 )
406+ expect ( minimapElement . CanvasDrawer . drawGutterDecoration ) . toHaveBeenCalled ( )
407+ expect ( minimapElement . CanvasDrawer . drawGutterDecoration . calls . length ) . toEqual ( 2 )
408408 } )
409409 } )
410410
@@ -423,8 +423,8 @@ describe('MinimapElement', () => {
423423 runs ( ( ) => {
424424 nextAnimationFrame ( )
425425
426- expect ( minimapElement . drawHighlightDecoration ) . toHaveBeenCalled ( )
427- expect ( minimapElement . drawHighlightDecoration . calls . length ) . toEqual ( 2 )
426+ expect ( minimapElement . CanvasDrawer . drawHighlightDecoration ) . toHaveBeenCalled ( )
427+ expect ( minimapElement . CanvasDrawer . drawHighlightDecoration . calls . length ) . toEqual ( 2 )
428428 } )
429429 } )
430430
@@ -587,8 +587,8 @@ describe('MinimapElement', () => {
587587
588588 describe ( 'when the editor visibility change' , ( ) => {
589589 it ( 'does not modify the size of the canvas' , ( ) => {
590- const canvasWidth = minimapElement . getFrontCanvas ( ) . width
591- const canvasHeight = minimapElement . getFrontCanvas ( ) . height
590+ const canvasWidth = minimapElement . CanvasDrawer . getFrontCanvas ( ) . width
591+ const canvasHeight = minimapElement . CanvasDrawer . getFrontCanvas ( ) . height
592592 editorElement . style . display = 'none'
593593
594594 minimapElement . measureHeightAndWidth ( )
@@ -599,8 +599,8 @@ describe('MinimapElement', () => {
599599 runs ( ( ) => {
600600 nextAnimationFrame ( )
601601
602- expect ( minimapElement . getFrontCanvas ( ) . width ) . toEqual ( canvasWidth )
603- expect ( minimapElement . getFrontCanvas ( ) . height ) . toEqual ( canvasHeight )
602+ expect ( minimapElement . CanvasDrawer . getFrontCanvas ( ) . width ) . toEqual ( canvasWidth )
603+ expect ( minimapElement . CanvasDrawer . getFrontCanvas ( ) . height ) . toEqual ( canvasHeight )
604604 } )
605605 } )
606606
@@ -693,7 +693,7 @@ describe('MinimapElement', () => {
693693 let [ canvas , visibleArea , originalLeft , maxScroll ] = [ ]
694694
695695 beforeEach ( ( ) => {
696- canvas = minimapElement . getFrontCanvas ( )
696+ canvas = minimapElement . CanvasDrawer . getFrontCanvas ( )
697697 visibleArea = minimapElement . visibleArea
698698 originalLeft = visibleArea . getBoundingClientRect ( ) . left
699699 maxScroll = minimap . getTextEditorMaxScrollTop ( )
@@ -784,7 +784,7 @@ describe('MinimapElement', () => {
784784
785785 atom . config . set ( 'minimap.scrollAnimation' , false )
786786
787- canvas = minimapElement . getFrontCanvas ( )
787+ canvas = minimapElement . CanvasDrawer . getFrontCanvas ( )
788788 } )
789789
790790 it ( 'scrolls the editor to the line below the mouse' , ( ) => {
@@ -825,7 +825,7 @@ describe('MinimapElement', () => {
825825 atom . config . set ( 'minimap.scrollAnimation' , true )
826826 atom . config . set ( 'minimap.scrollAnimationDuration' , 300 )
827827
828- canvas = minimapElement . getFrontCanvas ( )
828+ canvas = minimapElement . CanvasDrawer . getFrontCanvas ( )
829829 } )
830830
831831 it ( 'scrolls the editor gradually to the line below the mouse' , ( ) => {
@@ -1127,7 +1127,7 @@ describe('MinimapElement', () => {
11271127
11281128 atom . config . set ( 'minimap.scrollAnimation' , false )
11291129
1130- canvas = minimapElement . getFrontCanvas ( )
1130+ canvas = minimapElement . CanvasDrawer . getFrontCanvas ( )
11311131 mousedown ( canvas )
11321132 } )
11331133
@@ -1357,7 +1357,7 @@ describe('MinimapElement', () => {
13571357 } )
13581358
13591359 it ( 'adjusts the width of the minimap canvas' , ( ) => {
1360- expect ( minimapElement . getFrontCanvas ( ) . width / devicePixelRatio ) . toEqual ( 4 )
1360+ expect ( minimapElement . CanvasDrawer . getFrontCanvas ( ) . width / devicePixelRatio ) . toEqual ( 4 )
13611361 } )
13621362
13631363 it ( 'offsets the minimap by the difference' , ( ) => {
@@ -1376,7 +1376,7 @@ describe('MinimapElement', () => {
13761376 } )
13771377 runs ( ( ) => {
13781378 nextAnimationFrame ( )
1379- expect ( minimapElement . getFrontCanvas ( ) . width / devicePixelRatio ) . toEqual ( 4 )
1379+ expect ( minimapElement . CanvasDrawer . getFrontCanvas ( ) . width / devicePixelRatio ) . toEqual ( 4 )
13801380 } )
13811381 } )
13821382 } )
@@ -1694,7 +1694,7 @@ describe('MinimapElement', () => {
16941694 } )
16951695
16961696 it ( 'positions the quick settings view next to the minimap' , ( ) => {
1697- const minimapBounds = minimapElement . getFrontCanvas ( ) . getBoundingClientRect ( )
1697+ const minimapBounds = minimapElement . CanvasDrawer . getFrontCanvas ( ) . getBoundingClientRect ( )
16981698 const settingsBounds = quickSettingsElement . getBoundingClientRect ( )
16991699
17001700 expect ( realOffsetTop ( quickSettingsElement ) ) . toBeCloseTo ( minimapBounds . top , 0 )
@@ -1721,7 +1721,7 @@ describe('MinimapElement', () => {
17211721 } )
17221722
17231723 it ( 'positions the quick settings view next to the minimap' , ( ) => {
1724- const minimapBounds = minimapElement . getFrontCanvas ( ) . getBoundingClientRect ( )
1724+ const minimapBounds = minimapElement . CanvasDrawer . getFrontCanvas ( ) . getBoundingClientRect ( )
17251725
17261726 expect ( realOffsetTop ( quickSettingsElement ) ) . toBeCloseTo ( minimapBounds . top , 0 )
17271727 expect ( realOffsetLeft ( quickSettingsElement ) ) . toBeCloseTo ( minimapBounds . right , 0 )
@@ -1755,12 +1755,12 @@ describe('MinimapElement', () => {
17551755 } )
17561756
17571757 it ( 'adjusts the size of the control div to fit in the minimap' , ( ) => {
1758- expect ( controls . clientWidth ) . toEqual ( minimapElement . getFrontCanvas ( ) . clientWidth / devicePixelRatio )
1758+ expect ( controls . clientWidth ) . toEqual ( minimapElement . CanvasDrawer . getFrontCanvas ( ) . clientWidth / devicePixelRatio )
17591759 } )
17601760
17611761 it ( 'positions the controls div over the canvas' , ( ) => {
17621762 const controlsRect = controls . getBoundingClientRect ( )
1763- const canvasRect = minimapElement . getFrontCanvas ( ) . getBoundingClientRect ( )
1763+ const canvasRect = minimapElement . CanvasDrawer . getFrontCanvas ( ) . getBoundingClientRect ( )
17641764 expect ( controlsRect . left ) . toEqual ( canvasRect . left )
17651765 expect ( controlsRect . right ) . toEqual ( canvasRect . right )
17661766 } )
@@ -1771,12 +1771,12 @@ describe('MinimapElement', () => {
17711771 } )
17721772
17731773 it ( 'adjusts the size of the control div to fit in the minimap' , ( ) => {
1774- expect ( controls . clientWidth ) . toEqual ( minimapElement . getFrontCanvas ( ) . clientWidth / devicePixelRatio )
1774+ expect ( controls . clientWidth ) . toEqual ( minimapElement . CanvasDrawer . getFrontCanvas ( ) . clientWidth / devicePixelRatio )
17751775 } )
17761776
17771777 it ( 'positions the controls div over the canvas' , ( ) => {
17781778 const controlsRect = controls . getBoundingClientRect ( )
1779- const canvasRect = minimapElement . getFrontCanvas ( ) . getBoundingClientRect ( )
1779+ const canvasRect = minimapElement . CanvasDrawer . getFrontCanvas ( ) . getBoundingClientRect ( )
17801780 expect ( controlsRect . left ) . toEqual ( canvasRect . left )
17811781 expect ( controlsRect . right ) . toEqual ( canvasRect . right )
17821782 } )
@@ -1797,7 +1797,7 @@ describe('MinimapElement', () => {
17971797 } )
17981798
17991799 it ( 'positions the quick settings view next to the minimap' , ( ) => {
1800- const minimapBounds = minimapElement . getFrontCanvas ( ) . getBoundingClientRect ( )
1800+ const minimapBounds = minimapElement . CanvasDrawer . getFrontCanvas ( ) . getBoundingClientRect ( )
18011801
18021802 expect ( realOffsetTop ( quickSettingsElement ) ) . toBeNear ( minimapBounds . top , 1 )
18031803 expect ( realOffsetLeft ( quickSettingsElement ) ) . toBeNear ( minimapBounds . right , 1 )
0 commit comments