This commit is contained in:
Paul Kaplan 2017-10-30 11:13:29 -04:00
parent 7cc3ecf74b
commit 3dab6ef7f0
3 changed files with 2 additions and 6 deletions

View file

@ -24,8 +24,6 @@ class FillColorIndicator extends React.Component {
if (fillColorModalVisible && !newProps.fillColorModalVisible) {
// Submit the new SVG, which also stores a single undo/redo action.
if (this._hasChanged) onUpdateSvg();
} else if (newProps.fillColorModalVisible && !fillColorModalVisible) {
// If modal is opening, reset the _hasChanged flag to false;
this._hasChanged = false;
}
}

View file

@ -24,8 +24,6 @@ class StrokeColorIndicator extends React.Component {
if (strokeColorModalVisible && !newProps.strokeColorModalVisible) {
// Submit the new SVG, which also stores a single undo/redo action.
if (this._hasChanged) onUpdateSvg();
} else if (newProps.strokeColorModalVisible && !strokeColorModalVisible) {
// If modal is opening, reset the _hasChanged flag to false;
this._hasChanged = false;
}
}

View file

@ -8,7 +8,7 @@ const MIXED = 'scratch-paint/style-path/mixed';
/**
* Called when setting fill color
* @param {string} colorString New color, css format
* @return {boolean} Whether the color application actually changed anything.
* @return {boolean} Whether the color application actually changed visibly.
*/
const applyFillColorToSelection = function (colorString) {
const items = getSelectedLeafItems();
@ -56,7 +56,7 @@ const _strokeColorMatch = function (item, incomingColor) {
/**
* Called when setting stroke color
* @param {string} colorString New color, css format
* @return {boolean} Whether the color application actually changed anything.
* @return {boolean} Whether the color application actually changed visibly.
*/
const applyStrokeColorToSelection = function (colorString) {
const items = getSelectedLeafItems();