@@ -390,7 +390,7 @@ describe('MinimapElement', () => {
390390 } )
391391
392392 it ( 'renders the visible gutter decorations' , ( ) => {
393- spyOn ( minimapElement , 'drawGutterDecoration' ) . andCallThrough ( )
393+ spyOn ( minimapElement . CanvasDrawer , 'drawGutterDecoration' ) . andCallThrough ( )
394394
395395 minimap . decorateMarker ( editor . markBufferRange ( [ [ 1 , 0 ] , [ 1 , 10 ] ] ) , { type : 'gutter' , color : '#0000FF' } )
396396 minimap . decorateMarker ( editor . markBufferRange ( [ [ 10 , 0 ] , [ 10 , 10 ] ] ) , { type : 'gutter' , color : '#0000FF' } )
@@ -404,8 +404,8 @@ describe('MinimapElement', () => {
404404 runs ( ( ) => {
405405 nextAnimationFrame ( )
406406
407- expect ( minimapElement . drawGutterDecoration ) . toHaveBeenCalled ( )
408- expect ( minimapElement . drawGutterDecoration . calls . length ) . toEqual ( 2 )
407+ expect ( minimapElement . CanvasDrawer . drawGutterDecoration ) . toHaveBeenCalled ( )
408+ expect ( minimapElement . CanvasDrawer . drawGutterDecoration . calls . length ) . toEqual ( 2 )
409409 } )
410410 } )
411411
@@ -424,8 +424,8 @@ describe('MinimapElement', () => {
424424 runs ( ( ) => {
425425 nextAnimationFrame ( )
426426
427- expect ( minimapElement . drawHighlightDecoration ) . toHaveBeenCalled ( )
428- expect ( minimapElement . drawHighlightDecoration . calls . length ) . toEqual ( 2 )
427+ expect ( minimapElement . CanvasDrawer . drawHighlightDecoration ) . toHaveBeenCalled ( )
428+ expect ( minimapElement . CanvasDrawer . drawHighlightDecoration . calls . length ) . toEqual ( 2 )
429429 } )
430430 } )
431431
@@ -588,8 +588,8 @@ describe('MinimapElement', () => {
588588
589589 describe ( 'when the editor visibility change' , ( ) => {
590590 it ( 'does not modify the size of the canvas' , ( ) => {
591- const canvasWidth = minimapElement . getFrontCanvas ( ) . width
592- const canvasHeight = minimapElement . getFrontCanvas ( ) . height
591+ const canvasWidth = minimapElement . CanvasDrawer . getFrontCanvas ( ) . width
592+ const canvasHeight = minimapElement . CanvasDrawer . getFrontCanvas ( ) . height
593593 editorElement . style . display = 'none'
594594
595595 minimapElement . measureHeightAndWidth ( )
@@ -600,8 +600,8 @@ describe('MinimapElement', () => {
600600 runs ( ( ) => {
601601 nextAnimationFrame ( )
602602
603- expect ( minimapElement . getFrontCanvas ( ) . width ) . toEqual ( canvasWidth )
604- expect ( minimapElement . getFrontCanvas ( ) . height ) . toEqual ( canvasHeight )
603+ expect ( minimapElement . CanvasDrawer . getFrontCanvas ( ) . width ) . toEqual ( canvasWidth )
604+ expect ( minimapElement . CanvasDrawer . getFrontCanvas ( ) . height ) . toEqual ( canvasHeight )
605605 } )
606606 } )
607607
@@ -694,7 +694,7 @@ describe('MinimapElement', () => {
694694 let [ canvas , visibleArea , originalLeft , maxScroll ] = [ ]
695695
696696 beforeEach ( ( ) => {
697- canvas = minimapElement . getFrontCanvas ( )
697+ canvas = minimapElement . CanvasDrawer . getFrontCanvas ( )
698698 visibleArea = minimapElement . visibleArea
699699 originalLeft = visibleArea . getBoundingClientRect ( ) . left
700700 maxScroll = minimap . getTextEditorMaxScrollTop ( )
@@ -785,7 +785,7 @@ describe('MinimapElement', () => {
785785
786786 atom . config . set ( 'minimap.scrollAnimation' , false )
787787
788- canvas = minimapElement . getFrontCanvas ( )
788+ canvas = minimapElement . CanvasDrawer . getFrontCanvas ( )
789789 } )
790790
791791 it ( 'scrolls the editor to the line below the mouse' , ( ) => {
@@ -826,7 +826,7 @@ describe('MinimapElement', () => {
826826 atom . config . set ( 'minimap.scrollAnimation' , true )
827827 atom . config . set ( 'minimap.scrollAnimationDuration' , 300 )
828828
829- canvas = minimapElement . getFrontCanvas ( )
829+ canvas = minimapElement . CanvasDrawer . getFrontCanvas ( )
830830 } )
831831
832832 it ( 'scrolls the editor gradually to the line below the mouse' , ( ) => {
@@ -1128,7 +1128,7 @@ describe('MinimapElement', () => {
11281128
11291129 atom . config . set ( 'minimap.scrollAnimation' , false )
11301130
1131- canvas = minimapElement . getFrontCanvas ( )
1131+ canvas = minimapElement . CanvasDrawer . getFrontCanvas ( )
11321132 mousedown ( canvas )
11331133 } )
11341134
@@ -1356,7 +1356,7 @@ describe('MinimapElement', () => {
13561356 } )
13571357
13581358 it ( 'adjusts the width of the minimap canvas' , ( ) => {
1359- expect ( minimapElement . getFrontCanvas ( ) . width / devicePixelRatio ) . toEqual ( 4 )
1359+ expect ( minimapElement . CanvasDrawer . getFrontCanvas ( ) . width / devicePixelRatio ) . toEqual ( 4 )
13601360 } )
13611361
13621362 it ( 'offsets the minimap by the difference' , ( ) => {
@@ -1375,7 +1375,7 @@ describe('MinimapElement', () => {
13751375 } )
13761376 runs ( ( ) => {
13771377 nextAnimationFrame ( )
1378- expect ( minimapElement . getFrontCanvas ( ) . width / devicePixelRatio ) . toEqual ( 4 )
1378+ expect ( minimapElement . CanvasDrawer . getFrontCanvas ( ) . width / devicePixelRatio ) . toEqual ( 4 )
13791379 } )
13801380 } )
13811381 } )
@@ -1693,7 +1693,7 @@ describe('MinimapElement', () => {
16931693 } )
16941694
16951695 it ( 'positions the quick settings view next to the minimap' , ( ) => {
1696- const minimapBounds = minimapElement . getFrontCanvas ( ) . getBoundingClientRect ( )
1696+ const minimapBounds = minimapElement . CanvasDrawer . getFrontCanvas ( ) . getBoundingClientRect ( )
16971697 const settingsBounds = quickSettingsElement . getBoundingClientRect ( )
16981698
16991699 expect ( realOffsetTop ( quickSettingsElement ) ) . toBeCloseTo ( minimapBounds . top , 0 )
@@ -1720,7 +1720,7 @@ describe('MinimapElement', () => {
17201720 } )
17211721
17221722 it ( 'positions the quick settings view next to the minimap' , ( ) => {
1723- const minimapBounds = minimapElement . getFrontCanvas ( ) . getBoundingClientRect ( )
1723+ const minimapBounds = minimapElement . CanvasDrawer . getFrontCanvas ( ) . getBoundingClientRect ( )
17241724
17251725 expect ( realOffsetTop ( quickSettingsElement ) ) . toBeCloseTo ( minimapBounds . top , 0 )
17261726 expect ( realOffsetLeft ( quickSettingsElement ) ) . toBeCloseTo ( minimapBounds . right , 0 )
@@ -1754,12 +1754,12 @@ describe('MinimapElement', () => {
17541754 } )
17551755
17561756 it ( 'adjusts the size of the control div to fit in the minimap' , ( ) => {
1757- expect ( controls . clientWidth ) . toEqual ( minimapElement . getFrontCanvas ( ) . clientWidth / devicePixelRatio )
1757+ expect ( controls . clientWidth ) . toEqual ( minimapElement . CanvasDrawer . getFrontCanvas ( ) . clientWidth / devicePixelRatio )
17581758 } )
17591759
17601760 it ( 'positions the controls div over the canvas' , ( ) => {
17611761 const controlsRect = controls . getBoundingClientRect ( )
1762- const canvasRect = minimapElement . getFrontCanvas ( ) . getBoundingClientRect ( )
1762+ const canvasRect = minimapElement . CanvasDrawer . getFrontCanvas ( ) . getBoundingClientRect ( )
17631763 expect ( controlsRect . left ) . toEqual ( canvasRect . left )
17641764 expect ( controlsRect . right ) . toEqual ( canvasRect . right )
17651765 } )
@@ -1770,12 +1770,12 @@ describe('MinimapElement', () => {
17701770 } )
17711771
17721772 it ( 'adjusts the size of the control div to fit in the minimap' , ( ) => {
1773- expect ( controls . clientWidth ) . toEqual ( minimapElement . getFrontCanvas ( ) . clientWidth / devicePixelRatio )
1773+ expect ( controls . clientWidth ) . toEqual ( minimapElement . CanvasDrawer . getFrontCanvas ( ) . clientWidth / devicePixelRatio )
17741774 } )
17751775
17761776 it ( 'positions the controls div over the canvas' , ( ) => {
17771777 const controlsRect = controls . getBoundingClientRect ( )
1778- const canvasRect = minimapElement . getFrontCanvas ( ) . getBoundingClientRect ( )
1778+ const canvasRect = minimapElement . CanvasDrawer . getFrontCanvas ( ) . getBoundingClientRect ( )
17791779 expect ( controlsRect . left ) . toEqual ( canvasRect . left )
17801780 expect ( controlsRect . right ) . toEqual ( canvasRect . right )
17811781 } )
@@ -1796,7 +1796,7 @@ describe('MinimapElement', () => {
17961796 } )
17971797
17981798 it ( 'positions the quick settings view next to the minimap' , ( ) => {
1799- const minimapBounds = minimapElement . getFrontCanvas ( ) . getBoundingClientRect ( )
1799+ const minimapBounds = minimapElement . CanvasDrawer . getFrontCanvas ( ) . getBoundingClientRect ( )
18001800
18011801 expect ( realOffsetTop ( quickSettingsElement ) ) . toBeNear ( minimapBounds . top , 1 )
18021802 expect ( realOffsetLeft ( quickSettingsElement ) ) . toBeNear ( minimapBounds . right , 1 )
0 commit comments