Skip to content

Commit f9ef6c3

Browse files
committed
optimize dom get/set
1 parent 38628e4 commit f9ef6c3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/minimap-view.coffee

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,10 +135,12 @@ class MinimapView extends View
135135
@offset top: (@offsetTop = @editorView.offset().top)
136136

137137
{width, height} = @getMinimapClientRect()
138+
editorViewRect = @getEditorViewClientRect()
139+
miniScrollViewRect = @miniEditorView.getClientRect()
140+
138141
width /= @scaleX
139142
height /= @scaleY
140143

141-
editorViewRect = @getEditorViewClientRect()
142144
evw = editorViewRect.width
143145
evh = editorViewRect.height
144146

@@ -149,7 +151,6 @@ class MinimapView extends View
149151
width : @indicator.width = width
150152
height: @indicator.height = evh
151153

152-
miniScrollViewRect = @miniEditorView.getClientRect()
153154
msvw = miniScrollViewRect.width || 0
154155
msvh = miniScrollViewRect.height || 0
155156

0 commit comments

Comments
 (0)