mirror of
https://github.com/scratchfoundation/scratch-paint.git
synced 2024-12-22 21:42:30 -05:00
fix lint
This commit is contained in:
parent
b87c17523a
commit
7a9399d0db
5 changed files with 9 additions and 8 deletions
|
@ -23,7 +23,8 @@ const FillColorIndicatorComponent = props => (
|
||||||
<Label text={props.intl.formatMessage(messages.fill)}>
|
<Label text={props.intl.formatMessage(messages.fill)}>
|
||||||
<BufferedInput
|
<BufferedInput
|
||||||
type="text"
|
type="text"
|
||||||
value={props.fillColor === MIXED ? 'mixed' : props.fillColor === null ? 'transparent' : props.fillColor} // @todo Don't use text to indicate mixed
|
value={props.fillColor === MIXED ? 'mixed' :
|
||||||
|
props.fillColor === null ? 'transparent' : props.fillColor} // @todo Don't use text
|
||||||
onSubmit={props.onChangeFillColor}
|
onSubmit={props.onChangeFillColor}
|
||||||
/>
|
/>
|
||||||
</Label>
|
</Label>
|
||||||
|
|
|
@ -23,8 +23,9 @@ const StrokeColorIndicatorComponent = props => (
|
||||||
<Label text={props.intl.formatMessage(messages.stroke)}>
|
<Label text={props.intl.formatMessage(messages.stroke)}>
|
||||||
<BufferedInput
|
<BufferedInput
|
||||||
type="text"
|
type="text"
|
||||||
// @todo Don't use text to indicate mixed
|
// @todo Don't use text
|
||||||
value={props.strokeColor === MIXED ? 'mixed' : props.strokeColor === null ? 'transparent' : props.strokeColor}
|
value={props.strokeColor === MIXED ? 'mixed' :
|
||||||
|
props.strokeColor === null ? 'transparent' : props.strokeColor}
|
||||||
onSubmit={props.onChangeStrokeColor}
|
onSubmit={props.onChangeStrokeColor}
|
||||||
/>
|
/>
|
||||||
</Label>
|
</Label>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import paper from 'paper';
|
import paper from 'paper';
|
||||||
import keyMirror from 'keymirror';
|
import keyMirror from 'keymirror';
|
||||||
|
|
||||||
import {clearSelection, getSelectedItems} from '../selection';
|
import {getSelectedItems} from '../selection';
|
||||||
import {getGuideColor, removeHelperItems} from '../guides';
|
import {getGuideColor, removeHelperItems} from '../guides';
|
||||||
import {getGuideLayer} from '../layer';
|
import {getGuideLayer} from '../layer';
|
||||||
|
|
||||||
|
@ -37,8 +37,6 @@ class BoundingBoxTool {
|
||||||
* @param {!function} onUpdateSvg A callback to call when the image visibly changes
|
* @param {!function} onUpdateSvg A callback to call when the image visibly changes
|
||||||
*/
|
*/
|
||||||
constructor (setSelectedItems, clearSelectedItems, onUpdateSvg) {
|
constructor (setSelectedItems, clearSelectedItems, onUpdateSvg) {
|
||||||
this.setSelectedItems = setSelectedItems;
|
|
||||||
this.clearSelectedItems = clearSelectedItems;
|
|
||||||
this.onUpdateSvg = onUpdateSvg;
|
this.onUpdateSvg = onUpdateSvg;
|
||||||
this.mode = null;
|
this.mode = null;
|
||||||
this.boundsPath = null;
|
this.boundsPath = null;
|
||||||
|
|
|
@ -57,7 +57,8 @@ class ReshapeTool extends paper.Tool {
|
||||||
this._modeMap[ReshapeModes.FILL] = new MoveTool(setSelectedItems, clearSelectedItems, onUpdateSvg);
|
this._modeMap[ReshapeModes.FILL] = new MoveTool(setSelectedItems, clearSelectedItems, onUpdateSvg);
|
||||||
this._modeMap[ReshapeModes.POINT] = new PointTool(setSelectedItems, clearSelectedItems, onUpdateSvg);
|
this._modeMap[ReshapeModes.POINT] = new PointTool(setSelectedItems, clearSelectedItems, onUpdateSvg);
|
||||||
this._modeMap[ReshapeModes.HANDLE] = new HandleTool(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
|
// We have to set these functions instead of just declaring them because
|
||||||
// paper.js tools hook up the listeners in the setter functions.
|
// paper.js tools hook up the listeners in the setter functions.
|
||||||
|
|
|
@ -160,7 +160,7 @@ const getColorsFromSelection = function () {
|
||||||
return {
|
return {
|
||||||
fillColor: selectionFillColorString ? selectionFillColorString : null,
|
fillColor: selectionFillColorString ? selectionFillColorString : null,
|
||||||
strokeColor: selectionStrokeColorString ? selectionStrokeColorString : null,
|
strokeColor: selectionStrokeColorString ? selectionStrokeColorString : null,
|
||||||
strokeWidth: selectionStrokeWidth || (selectionStrokeWidth === null) ? selectionStrokeWidth : 0 //todo why is this 0 for arrow
|
strokeWidth: selectionStrokeWidth || (selectionStrokeWidth === null) ? selectionStrokeWidth : 0
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue