Skip to content

Commit

Permalink
Fix: don't attempt grouping while mouse is down (#34448) (#34463)
Browse files Browse the repository at this point in the history
  • Loading branch information
monfera authored Apr 8, 2019
1 parent dc714d2 commit 1818c4c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion x-pack/plugins/canvas/public/lib/aeroelastic/layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ const rotationTooltipAnnotation = select(getRotationTooltipAnnotation)(
cursorPosition
);

const groupAction = select(getGroupAction)(actionEvent);
const groupAction = select(getGroupAction)(actionEvent, mouseIsDown);

const grouping = select(getGrouping)(
configuration,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1358,9 +1358,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;
Expand Down

0 comments on commit 1818c4c

Please sign in to comment.