Skip to content

Commit

Permalink
Restore start/stop drag
Browse files Browse the repository at this point in the history
  • Loading branch information
outoftime committed Jun 1, 2018
1 parent 1236f9e commit 7c11d09
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/components/Workspace.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ export default class Workspace extends React.Component {
flex,
flexRefs,
onDrag,
onStartDragColumnDivider,
onStopDragColumnDivider,
} = this.props;
if (isNull(currentProject)) {
return <PopThrobber message={t('workspace.loading')} />;
Expand All @@ -119,6 +121,8 @@ export default class Workspace extends React.Component {
/>
<DraggableCore
onDrag={partial(onDrag, 0)}
onStart={onStartDragColumnDivider}
onStop={onStopDragColumnDivider}
>
<div
className="editors__column-divider"
Expand Down Expand Up @@ -157,6 +161,8 @@ Workspace.propTypes = {
onApplicationLoaded: PropTypes.func.isRequired,
onComponentToggle: PropTypes.func.isRequired,
onDrag: PropTypes.func.isRequired,
onStartDragColumnDivider: PropTypes.func.isRequired,
onStopDragColumnDivider: PropTypes.func.isRequired,
};

Workspace.defaultProps = {
Expand Down
10 changes: 10 additions & 0 deletions src/containers/Workspace.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import {getCurrentProject, isEditingInstructions} from '../selectors';
import {
toggleComponent,
applicationLoaded,
startDragColumnDivider,
stopDragColumnDivider,
} from '../actions';
import resizableFlex from '../util/resizableFlex';

Expand All @@ -24,6 +26,14 @@ function mapDispatchToProps(dispatch) {
onComponentToggle(projectKey, componentName) {
dispatch(toggleComponent(projectKey, componentName));
},

onStartDragColumnDivider() {
dispatch(startDragColumnDivider());
},

onStopDragColumnDivider() {
dispatch(stopDragColumnDivider());
},
};
}

Expand Down

0 comments on commit 7c11d09

Please sign in to comment.