summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSidharth Singh2012-11-02 03:42:02 (EDT)
committer Sven Rottstock2012-11-14 09:20:05 (EST)
commitd343f2265e694bf1ba95d0f8a0db2d2ac11683e9 (patch)
tree2974781a3d8e8cdd3c7c6e51dd1db4123b5dca27
parent08bf82b229c6cdd086cedb18d70d016357d91ca1 (diff)
downloadorg.eclipse.stardust.ui.web-d343f2265e694bf1ba95d0f8a0db2d2ac11683e9.zip
org.eclipse.stardust.ui.web-d343f2265e694bf1ba95d0f8a0db2d2ac11683e9.tar.gz
org.eclipse.stardust.ui.web-d343f2265e694bf1ba95d0f8a0db2d2ac11683e9.tar.bz2
CRNT-26452
Made changes in m_diagram.js processCommand to updatechild symbols when auto shrink/stretch happens. git-svn-id: http://emeafrazerg/svn/ipp/product/trunk/stardust/ui.web@60522 8100b5e0-4d52-466c-ae9c-bdeccbdeaf6b
-rw-r--r--web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/diagram/node/SwimlaneCommandHandler.java4
-rw-r--r--web-modeler/src/main/resources/META-INF/xhtml/js/m_diagram.js3
2 files changed, 5 insertions, 2 deletions
diff --git a/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/diagram/node/SwimlaneCommandHandler.java b/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/diagram/node/SwimlaneCommandHandler.java
index ea87063..2a3e6b0 100644
--- a/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/diagram/node/SwimlaneCommandHandler.java
+++ b/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/diagram/node/SwimlaneCommandHandler.java
@@ -188,13 +188,15 @@ public class SwimlaneCommandHandler
*/
private void updateAdjacentLanes(LaneSymbol currentLane, PoolSymbol poolSymbol)
{
+ long xOffset = 0;
for (LaneSymbol laneSymbol : poolSymbol.getLanes())
{
// For all lanes to the right of current lane, adjust 'X'
if (laneSymbol.getElementOid() != currentLane.getElementOid()
&& (laneSymbol.getXPos() > currentLane.getXPos()))
{
- long xOffset = laneSymbol.getXPos() - currentLane.getXPos();
+ if (xOffset == 0)
+ xOffset = laneSymbol.getXPos() - currentLane.getXPos();
laneSymbol.setXPos(laneSymbol.getXPos() - xOffset);
// TODO - Implement for horizontal orientation
}
diff --git a/web-modeler/src/main/resources/META-INF/xhtml/js/m_diagram.js b/web-modeler/src/main/resources/META-INF/xhtml/js/m_diagram.js
index 94b393f..6375e3a 100644
--- a/web-modeler/src/main/resources/META-INF/xhtml/js/m_diagram.js
+++ b/web-modeler/src/main/resources/META-INF/xhtml/js/m_diagram.js
@@ -799,11 +799,12 @@ define(
symbol.refresh();
if ((command.isUndo || command.isRedo)
&& symbol.type == m_constants.SWIMLANE_SYMBOL) {
- // When swimlane co-ordinates change,
+ // When swimlane co-ordinates change in Undo/Redo,
// PoolSymbol needs adjustment.
symbol.parentSymbol
.recalculateBoundingBox();
symbol.parentSymbol.adjustPrimitives();
+ this.poolSymbol.adjustChildSymbols();
}
this.resetLastSymbol(symbol.oid);
}