This commit is contained in:
DD 2017-10-03 13:45:19 -04:00
parent b87c17523a
commit 7a9399d0db
5 changed files with 9 additions and 8 deletions

View file

@ -23,7 +23,8 @@ const FillColorIndicatorComponent = props => (
<Label text={props.intl.formatMessage(messages.fill)}>
<BufferedInput
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}
/>
</Label>

View file

@ -23,8 +23,9 @@ const StrokeColorIndicatorComponent = props => (
<Label text={props.intl.formatMessage(messages.stroke)}>
<BufferedInput
type="text"
// @todo Don't use text to indicate mixed
value={props.strokeColor === MIXED ? 'mixed' : props.strokeColor === null ? 'transparent' : props.strokeColor}
// @todo Don't use text
value={props.strokeColor === MIXED ? 'mixed' :
props.strokeColor === null ? 'transparent' : props.strokeColor}
onSubmit={props.onChangeStrokeColor}
/>
</Label>

View file

@ -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;

View file

@ -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.

View file

@ -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
};
};