Call setSelectedItems from zoom functions (Fixes #219)

This commit is contained in:
Jacco Kulman 2018-03-26 12:59:26 +02:00
parent 724fe85645
commit 3afd232aea

View file

@ -36,6 +36,9 @@ class PaintEditor extends React.Component {
'handleSendToFront',
'handleGroup',
'handleUngroup',
'handleZoomIn',
'handleZoomOut',
'handleZoomReset',
'canRedo',
'canUndo',
'onMouseDown',
@ -129,12 +132,21 @@ class PaintEditor extends React.Component {
}
handleZoomIn () {
zoomOnSelection(PaintEditor.ZOOM_INCREMENT);
if (this.props.setSelectedItems) {
this.props.setSelectedItems();
}
}
handleZoomOut () {
zoomOnSelection(-PaintEditor.ZOOM_INCREMENT);
if (this.props.setSelectedItems) {
this.props.setSelectedItems();
}
}
handleZoomReset () {
resetZoom();
if (this.props.setSelectedItems) {
this.props.setSelectedItems();
}
}
setCanvas (canvas) {
this.setState({canvas: canvas});