Fix: don't attempt grouping while mouse is down (#34448)

This commit is contained in:
Robert Monfera 2019-04-03 19:17:12 +02:00 committed by GitHub
parent d33e6892da
commit 91f95ec9b5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View file

@ -182,7 +182,7 @@ const rotationTooltipAnnotation = select(getRotationTooltipAnnotation)(
cursorPosition
);
const groupAction = select(getGroupAction)(actionEvent);
const groupAction = select(getGroupAction)(actionEvent, mouseIsDown);
const groupingTuple = select(getGroupingTuple)(
configuration,

View file

@ -1376,9 +1376,9 @@ export const getSnappedShapes = (
export const getConstrainedShapesWithPreexistingAnnotations = (snapped, transformed) =>
snapped.concat(transformed.filter(s => s.type === 'annotation'));
export const getGroupAction = action => {
export const getGroupAction = (action, mouseIsDown) => {
const event = action && action.event;
return event === 'group' || event === 'ungroup' ? event : null;
return !mouseIsDown && (event === 'group' || event === 'ungroup') ? event : null;
};
export const getGroupedSelectedShapes = ({ selectedShapes }) => selectedShapes;