From 7a9399d0db17cd748263ec9d45b1dc791d65920a Mon Sep 17 00:00:00 2001 From: DD Date: Tue, 3 Oct 2017 13:45:19 -0400 Subject: [PATCH] fix lint --- src/components/fill-color-indicator.jsx | 3 ++- src/components/stroke-color-indicator.jsx | 5 +++-- src/helper/selection-tools/bounding-box-tool.js | 4 +--- src/helper/selection-tools/reshape-tool.js | 3 ++- src/helper/style-path.js | 2 +- 5 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/components/fill-color-indicator.jsx b/src/components/fill-color-indicator.jsx index 3e555fda..5d2f65d2 100644 --- a/src/components/fill-color-indicator.jsx +++ b/src/components/fill-color-indicator.jsx @@ -23,7 +23,8 @@ const FillColorIndicatorComponent = props => ( diff --git a/src/components/stroke-color-indicator.jsx b/src/components/stroke-color-indicator.jsx index 45fb4824..dcb7db5a 100644 --- a/src/components/stroke-color-indicator.jsx +++ b/src/components/stroke-color-indicator.jsx @@ -23,8 +23,9 @@ const StrokeColorIndicatorComponent = props => ( diff --git a/src/helper/selection-tools/bounding-box-tool.js b/src/helper/selection-tools/bounding-box-tool.js index df427f1d..842319dd 100644 --- a/src/helper/selection-tools/bounding-box-tool.js +++ b/src/helper/selection-tools/bounding-box-tool.js @@ -1,7 +1,7 @@ import paper from 'paper'; import keyMirror from 'keymirror'; -import {clearSelection, getSelectedItems} from '../selection'; +import {getSelectedItems} from '../selection'; import {getGuideColor, removeHelperItems} from '../guides'; import {getGuideLayer} from '../layer'; @@ -37,8 +37,6 @@ class BoundingBoxTool { * @param {!function} onUpdateSvg A callback to call when the image visibly changes */ constructor (setSelectedItems, clearSelectedItems, onUpdateSvg) { - this.setSelectedItems = setSelectedItems; - this.clearSelectedItems = clearSelectedItems; this.onUpdateSvg = onUpdateSvg; this.mode = null; this.boundsPath = null; diff --git a/src/helper/selection-tools/reshape-tool.js b/src/helper/selection-tools/reshape-tool.js index 6d469b23..efa75158 100644 --- a/src/helper/selection-tools/reshape-tool.js +++ b/src/helper/selection-tools/reshape-tool.js @@ -57,7 +57,8 @@ class ReshapeTool extends paper.Tool { this._modeMap[ReshapeModes.FILL] = new MoveTool(setSelectedItems, clearSelectedItems, onUpdateSvg); this._modeMap[ReshapeModes.POINT] = new PointTool(setSelectedItems, clearSelectedItems, onUpdateSvg); this._modeMap[ReshapeModes.HANDLE] = new HandleTool(setSelectedItems, clearSelectedItems, onUpdateSvg); - this._modeMap[ReshapeModes.SELECTION_BOX] = new SelectionBoxTool(Modes.RESHAPE, setSelectedItems, clearSelectedItems); + this._modeMap[ReshapeModes.SELECTION_BOX] = + new SelectionBoxTool(Modes.RESHAPE, setSelectedItems, clearSelectedItems); // We have to set these functions instead of just declaring them because // paper.js tools hook up the listeners in the setter functions. diff --git a/src/helper/style-path.js b/src/helper/style-path.js index 00b8a979..6c660017 100644 --- a/src/helper/style-path.js +++ b/src/helper/style-path.js @@ -160,7 +160,7 @@ const getColorsFromSelection = function () { return { fillColor: selectionFillColorString ? selectionFillColorString : null, strokeColor: selectionStrokeColorString ? selectionStrokeColorString : null, - strokeWidth: selectionStrokeWidth || (selectionStrokeWidth === null) ? selectionStrokeWidth : 0 //todo why is this 0 for arrow + strokeWidth: selectionStrokeWidth || (selectionStrokeWidth === null) ? selectionStrokeWidth : 0 }; };