Skip to content

Commit

Permalink
fix: ignore obsolete selection of resize handlers when deleting after…
Browse files Browse the repository at this point in the history
… a resize (#27767)
  • Loading branch information
monfera committed Dec 26, 2018
1 parent 72680f2 commit 580cfcc
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion x-pack/plugins/canvas/public/lib/aeroelastic/layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ const matrix = require('./matrix');
const matrix2d = require('./matrix2d');

const {
arrayToMap,
disjunctiveUnion,
identity,
flatten,
Expand Down Expand Up @@ -207,7 +208,10 @@ const contentShape = allShapes => shape =>
? contentShape(allShapes)(allShapes.find(s => s.id === shape.parent))
: shape;

const contentShapes = (allShapes, shapes) => shapes.map(contentShape(allShapes));
const contentShapes = (allShapes, shapes) => {
const idMap = arrayToMap(allShapes.map(shape => shape.id));
return shapes.filter(shape => idMap[shape.id]).map(contentShape(allShapes));
};

const selectionState = select(
(
Expand Down

0 comments on commit 580cfcc

Please sign in to comment.