"use strict";Liferay.Loader.define("portal-workflow-kaleo-designer-web$dagre@0.8.2/lib/coordinate-system",["module","exports","require","./lodash"],(function(e,n,o){window;{var r=o("./lodash");function swapWidthHeight(e){r.forEach(e.nodes(),(function(n){swapWidthHeightOne(e.node(n))})),r.forEach(e.edges(),(function(n){swapWidthHeightOne(e.edge(n))}))}function swapWidthHeightOne(e){var n=e.width;e.width=e.height,e.height=n}function reverseYOne(e){e.y=-e.y}function swapXYOne(e){var n=e.x;e.x=e.y,e.y=n}e.exports={adjust:function adjust(e){var n=e.graph().rankdir.toLowerCase();"lr"!==n&&"rl"!==n||swapWidthHeight(e)},undo:function undo(e){var n=e.graph().rankdir.toLowerCase();"bt"!==n&&"rl"!==n||function reverseY(e){r.forEach(e.nodes(),(function(n){reverseYOne(e.node(n))})),r.forEach(e.edges(),(function(n){var o=e.edge(n);r.forEach(o.points,reverseYOne),r.has(o,"y")&&reverseYOne(o)}))}(e),"lr"!==n&&"rl"!==n||(function swapXY(e){r.forEach(e.nodes(),(function(n){swapXYOne(e.node(n))})),r.forEach(e.edges(),(function(n){var o=e.edge(n);r.forEach(o.points,swapXYOne),r.has(o,"x")&&swapXYOne(o)}))}(e),swapWidthHeight(e))}}}}));
//# sourceMappingURL=coordinate-system.js.map