From 5ac7ffcf48c0a7c6a86fe83f0feafa018cd20e5b Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Thu, 26 Nov 2015 16:09:21 +0100 Subject: [PATCH] :art: Rename to ::blockDecorationsDimensionsById --- src/text-editor-presenter.coffee | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/text-editor-presenter.coffee b/src/text-editor-presenter.coffee index 6296e9331..cc5327f0e 100644 --- a/src/text-editor-presenter.coffee +++ b/src/text-editor-presenter.coffee @@ -28,7 +28,7 @@ class TextEditorPresenter @lineDecorationsByScreenRow = {} @lineNumberDecorationsByScreenRow = {} @customGutterDecorationsByGutterName = {} - @blockDecorationsDimensions = new Map + @blockDecorationsDimensionsById = new Map @screenRowsToMeasure = [] @transferMeasurementsToModel() @transferMeasurementsFromModel() @@ -737,7 +737,7 @@ class TextEditorPresenter @lineHeight * @model.getScreenLineCount() getBlockDecorationsHeight: -> - sizes = Array.from(@blockDecorationsDimensions.values()) + sizes = Array.from(@blockDecorationsDimensionsById.values()) sum = (a, b) -> a + b height = sizes.map((size) -> size.height).reduce(sum, 0) height @@ -1380,7 +1380,7 @@ class TextEditorPresenter @emitDidUpdateState() setBlockDecorationSize: (decoration, width, height) -> - @blockDecorationsDimensions.set(decoration.id, {width, height}) + @blockDecorationsDimensionsById.set(decoration.id, {width, height}) @shouldUpdateBlockDecorations = true @shouldUpdateVerticalScrollState = true @@ -1391,9 +1391,9 @@ class TextEditorPresenter for decoration in @model.getDecorations(type: "block") blockDecorations[decoration.id] = decoration - @blockDecorationsDimensions.forEach (value, key) => + @blockDecorationsDimensionsById.forEach (value, key) => unless blockDecorations.hasOwnProperty(key) - @blockDecorationsDimensions.delete(key) + @blockDecorationsDimensionsById.delete(key) @shouldUpdateVerticalScrollState = true