From 60a310ae853de0a8092b9e44e59ad461a8df7034 Mon Sep 17 00:00:00 2001 From: DD Date: Tue, 3 Oct 2017 18:13:12 -0400 Subject: [PATCH] remove unused --- src/containers/selection-hoc.jsx | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/src/containers/selection-hoc.jsx b/src/containers/selection-hoc.jsx index 2066ed09..d81a1c07 100644 --- a/src/containers/selection-hoc.jsx +++ b/src/containers/selection-hoc.jsx @@ -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); };