Fix: don't attempt grouping while mouse is down (#34448)
This commit is contained in:
parent
d33e6892da
commit
91f95ec9b5
|
@ -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,
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue