summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSidharth Singh2012-10-01 08:50:30 (EDT)
committerRobert Sauer2012-10-01 08:50:30 (EDT)
commitdc6aa22750f9d71733bdd493374368581bfb08ff (patch)
tree5ba9afefc8fa7b43e65f92bceaa103f3069290da
parent4afd64f62c403e95f5f04ce7d5200dc597a26b8c (diff)
downloadorg.eclipse.stardust.ui.web-dc6aa22750f9d71733bdd493374368581bfb08ff.zip
org.eclipse.stardust.ui.web-dc6aa22750f9d71733bdd493374368581bfb08ff.tar.gz
org.eclipse.stardust.ui.web-dc6aa22750f9d71733bdd493374368581bfb08ff.tar.bz2
CRNT-26421
Made changes in updateNodeSymbol to update all SwimlaneSymbol on height change. git-svn-id: http://emeafrazerg/svn/ipp/product/trunk/stardust/ui.web@59686 8100b5e0-4d52-466c-ae9c-bdeccbdeaf6b
-rw-r--r--web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/marshaling/ModelElementUnmarshaller.java14
-rw-r--r--web-modeler/src/main/resources/META-INF/xhtml/js/m_swimlaneSymbol.js11
2 files changed, 22 insertions, 3 deletions
diff --git a/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/marshaling/ModelElementUnmarshaller.java b/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/marshaling/ModelElementUnmarshaller.java
index d87cea6..0164446 100644
--- a/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/marshaling/ModelElementUnmarshaller.java
+++ b/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/marshaling/ModelElementUnmarshaller.java
@@ -15,6 +15,7 @@ import static org.eclipse.stardust.common.CollectionUtils.isEmpty;
import static org.eclipse.stardust.common.CollectionUtils.newHashMap;
import static org.eclipse.stardust.common.StringUtils.isEmpty;
import static org.eclipse.stardust.ui.web.modeler.marshaling.GsonUtils.extractInt;
+import static org.eclipse.stardust.ui.web.modeler.service.ModelService.HEIGHT_PROPERTY;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
@@ -76,6 +77,7 @@ import org.eclipse.stardust.model.xpdl.carnot.JoinSplitType;
import org.eclipse.stardust.model.xpdl.carnot.LaneSymbol;
import org.eclipse.stardust.model.xpdl.carnot.ModelType;
import org.eclipse.stardust.model.xpdl.carnot.OrganizationType;
+import org.eclipse.stardust.model.xpdl.carnot.PoolSymbol;
import org.eclipse.stardust.model.xpdl.carnot.ProcessDefinitionType;
import org.eclipse.stardust.model.xpdl.carnot.RoleType;
import org.eclipse.stardust.model.xpdl.carnot.StartEventSymbol;
@@ -814,7 +816,17 @@ public abstract class ModelElementUnmarshaller implements ModelUnmarshaller
if (nodeSymbolJto.has(ModelerConstants.HEIGHT_PROPERTY))
{
int height = extractInt(nodeSymbolJto, ModelerConstants.HEIGHT_PROPERTY);
- nodeSymbol.setHeight(height);
+ if (nodeSymbol instanceof LaneSymbol)
+ {
+ // For swimlane, all lanes height needs adjustment
+ PoolSymbol poolSymbol = (PoolSymbol) nodeSymbol.eContainer();
+ for (LaneSymbol lanes : poolSymbol.getLanes())
+ {
+ lanes.setHeight(height);
+ }
+ }
+ else
+ nodeSymbol.setHeight(height);
}
}
diff --git a/web-modeler/src/main/resources/META-INF/xhtml/js/m_swimlaneSymbol.js b/web-modeler/src/main/resources/META-INF/xhtml/js/m_swimlaneSymbol.js
index 59c60a0..f6e3abf 100644
--- a/web-modeler/src/main/resources/META-INF/xhtml/js/m_swimlaneSymbol.js
+++ b/web-modeler/src/main/resources/META-INF/xhtml/js/m_swimlaneSymbol.js
@@ -851,9 +851,16 @@ define(
this.parentSymbol.recalculateBoundingBox();
this.parentSymbol.adjustGeometry();
- var newGeometry = {"x": this.x, "y" : this.y, "parentSymbolId" : this.parentSymbol.id, "width" : this.width , "height" :this.height};
+ var changes = {
+ x : this.x,
+ y : this.y,
+ width : this.width,
+ height : this.height
+ };
+ var command = m_command
+ .createUpdateModelElementCommand(
+ this.diagram.modelId, this.oid, changes);
- var command = m_command.createMoveNodeSymbolCommand(this.diagram.model.id, this.oid, newGeometry);
m_commandsController.submitCommand(command);
}
};