remove unused

This commit is contained in:
DD 2017-10-03 18:13:12 -04:00
parent aa2b70f1e7
commit 60a310ae85

View file

@ -5,12 +5,6 @@ import React from 'react';
import {connect} from 'react-redux';
import bindAll from 'lodash.bindall';
import {getSelectedItems} from '../helper/selection';
import {getColorsFromSelection} from '../helper/style-path';
import {changeStrokeColor} from '../reducers/stroke-color';
import {changeStrokeWidth} from '../reducers/stroke-width';
import {changeFillColor} from '../reducers/fill-color';
const SelectionHOC = function (WrappedComponent) {
class SelectionComponent extends React.Component {
constructor (props) {
@ -59,21 +53,8 @@ const SelectionHOC = function (WrappedComponent) {
const mapStateToProps = state => ({
hoveredItemId: state.scratchPaint.hoveredItemId
});
const mapDispatchToProps = dispatch => ({
onUpdateColors: (() => {
const selectedItems = getSelectedItems(true /* recursive */);
if (selectedItems.length === 0) {
return;
}
const colorState = getColorsFromSelection(selectedItems);
dispatch(changeFillColor(colorState.fillColor));
dispatch(changeStrokeColor(colorState.strokeColor));
dispatch(changeStrokeWidth(colorState.strokeWidth));
})
});
return connect(
mapStateToProps,
mapDispatchToProps
mapStateToProps
)(SelectionComponent);
};