| author | Sidharth Singh | 2012-10-01 07:19:11 (EDT) |
|---|---|---|
| committer | Robert Sauer | 2012-10-01 07:19:11 (EDT) |
| commit | 15a130bde4d0d58c524ccc6d188132d167944c92 (patch) (side-by-side diff) | |
| tree | 3f6ae0f861d2ae8158297e3553750535151b74cf | |
| parent | 6efaa7e67172f28cc6dedbc5140ca6b034cfb562 (diff) | |
| download | org.eclipse.stardust.ui.web-15a130bde4d0d58c524ccc6d188132d167944c92.zip org.eclipse.stardust.ui.web-15a130bde4d0d58c524ccc6d188132d167944c92.tar.gz org.eclipse.stardust.ui.web-15a130bde4d0d58c524ccc6d188132d167944c92.tar.bz2 | |
CRNT-26421
1)Added code to update swimlane on resize.
2)Added a method to reset last symbol in m_diagram.js
git-svn-id: http://emeafrazerg/svn/ipp/product/trunk/stardust/ui.web@59680 8100b5e0-4d52-466c-ae9c-bdeccbdeaf6b
3 files changed, 31 insertions, 4 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 709934d..d87cea6 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 @@ -487,6 +487,8 @@ public abstract class ModelElementUnmarshaller implements ModelUnmarshaller { updateIdentifiableElement(swimlaneSymbol, swimlaneSymbolJson); + updateNodeSymbol(swimlaneSymbol, swimlaneSymbolJson); + mapDeclaredProperties(swimlaneSymbol, swimlaneSymbolJson, propertiesMap.get(LaneSymbol.class)); @@ -878,7 +880,7 @@ public abstract class ModelElementUnmarshaller implements ModelUnmarshaller } /** - * + * * @param annotationSymbol * @param annotationSymbolJson */ @@ -898,7 +900,7 @@ public abstract class ModelElementUnmarshaller implements ModelUnmarshaller if (StringUtils.isNotEmpty(content)) { TextType text = AbstractElementBuilder.F_CWM.createTextType(); - + text.getMixed().add(FeatureMapUtil.createRawTextEntry(content)); annotationSymbol.setText(text); } 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 3cd0bff..a9f0c9f 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 @@ -469,7 +469,7 @@ define( // Initialize Properties Panels
// TODO Should be done via extension mechanism
-
+
m_processPropertiesPanel.initialize(this);
m_activityPropertiesPanel.initialize(this);
m_dataPropertiesPanel.initialize(this);
@@ -665,6 +665,7 @@ define( }
if (null != symbol) {
symbol.remove();
+ this.resetLastSymbol(symbol.oid);
}
}
@@ -778,6 +779,7 @@ define( m_utils.debug("Changed symbol to:");
m_utils.debug(symbol);
symbol.refresh();
+ this.resetLastSymbol(symbol.oid);
}
symbol = this
@@ -794,6 +796,7 @@ define( m_utils.debug("Changed symbol to:");
m_utils.debug(symbol);
symbol.refresh();
+ this.resetLastSymbol(symbol.oid);
// TODO - update properties panel on
// modelElement change
}
@@ -821,7 +824,6 @@ define( this.animationDelay = 0;
this.animationEasing = null;
}
- this.lastSymbol = null;
};
/**
@@ -842,6 +844,16 @@ define( /**
*
*/
+ Diagram.prototype.resetLastSymbol = function(oid) {
+ if (oid && this.lastSymbol != null
+ && this.lastSymbol.oid == oid) {
+ this.lastSymbol = null;
+ }
+ };
+
+ /**
+ *
+ */
Diagram.prototype.findGatewaySymbolById = function(id) {
for ( var n in this.gatewaySymbols) {
var gatewaySymbol = this.gatewaySymbols[n];
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 8d90898..59c60a0 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 @@ -977,6 +977,19 @@ define( this.containedSymbols[n].moveBy(moveX, moveY);
}
}
+ if(preAdjustmentPos.width != this.width || preAdjustmentPos.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);
+ command.sync = true;
+ m_commandsController.submitCommand(command);
+ }
this.parentSymbol.recalculateBoundingBox();
this.parentSymbol.adjustGeometry();
};
|

