mirror of
https://github.com/scratchfoundation/scratch-paint.git
synced 2025-01-10 14:42:13 -05:00
Call setSelectedItems from zoom functions (Fixes #219)
This commit is contained in:
parent
724fe85645
commit
3afd232aea
1 changed files with 12 additions and 0 deletions
|
@ -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});
|
||||
|
|
Loading…
Reference in a new issue