mirror of
https://github.com/scratchfoundation/scratch-paint.git
synced 2024-12-22 21:42:30 -05:00
Fix nits
This commit is contained in:
parent
7cc3ecf74b
commit
3dab6ef7f0
3 changed files with 2 additions and 6 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue