| author | Sidharth Singh | 2012-08-20 04:55:39 (EDT) |
|---|---|---|
| committer | Manik Kishore | 2012-08-20 04:55:39 (EDT) |
| commit | 7fd64f9b579c17985406c22ac3e940affd41b050 (patch) (side-by-side diff) | |
| tree | def20ac98aa40e6d11227f8be49ebfd52ef76b74 | |
| parent | 60f94a99359fe4c0ccf5a54e3b93d387b3f0df32 (diff) | |
| download | org.eclipse.stardust.ui.web-7fd64f9b579c17985406c22ac3e940affd41b050.zip org.eclipse.stardust.ui.web-7fd64f9b579c17985406c22ac3e940affd41b050.tar.gz org.eclipse.stardust.ui.web-7fd64f9b579c17985406c22ac3e940affd41b050.tar.bz2 | |
Jira-ID: CRNT-25692
Added adjustment in adjustGeometry in m_symbol.js
Made change in EventCommandHandler for endEvent creation.
git-svn-id: http://emeafrazerg/svn/ipp/product/trunk/stardust/ui.web@58519 8100b5e0-4d52-466c-ae9c-bdeccbdeaf6b
4 files changed, 50 insertions, 8 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 9c3e8c4..28396c9 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 @@ -16,6 +16,7 @@ import static org.eclipse.stardust.model.xpdl.builder.BpmModelBuilder.newApplica import static org.eclipse.stardust.model.xpdl.builder.BpmModelBuilder.newSubProcessActivity; import static org.eclipse.stardust.ui.web.modeler.marshaling.GsonUtils.extractBoolean; import static org.eclipse.stardust.ui.web.modeler.marshaling.GsonUtils.extractString; +import static org.eclipse.stardust.ui.web.modeler.marshaling.GsonUtils.extractInt; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; @@ -317,6 +318,13 @@ public abstract class ModelElementUnmarshaller .getAsString(), true); transition.setExpression(expression); } + + controlFlowConnection.setSourceAnchor(mapAnchorOrientation(extractInt( + controlFlowConnectionJson, + ModelerConstants.FROM_ANCHOR_POINT_ORIENTATION_PROPERTY))); + controlFlowConnection.setTargetAnchor(mapAnchorOrientation(extractInt( + controlFlowConnectionJson, + ModelerConstants.TO_ANCHOR_POINT_ORIENTATION_PROPERTY))); } /** @@ -702,6 +710,33 @@ public abstract class ModelElementUnmarshaller /** * + * @param orientation + * @return + */ + private String mapAnchorOrientation(int orientation) + { + if (orientation == ModelerConstants.NORTH_KEY) + { + return "top"; + } + else if (orientation == ModelerConstants.EAST_KEY) + { + return "right"; + } + else if (orientation == ModelerConstants.SOUTH_KEY) + { + return "bottom"; + } + else if (orientation == ModelerConstants.WEST_KEY) + { + return "left"; + } + + throw new IllegalArgumentException("Illegal orientation key " + orientation + "."); + } + + /** + * * @return */ private MBFacade getModelBuilderFacade() diff --git a/web-modeler/src/main/resources/META-INF/xhtml/js/m_connection.js b/web-modeler/src/main/resources/META-INF/xhtml/js/m_connection.js index c2a9f07..a08a365 100644 --- a/web-modeler/src/main/resources/META-INF/xhtml/js/m_connection.js +++ b/web-modeler/src/main/resources/META-INF/xhtml/js/m_connection.js @@ -1209,6 +1209,16 @@ define( /**
*
*/
+ Connection.prototype.createUpdateCommand = function() {
+ var command = m_command.createUpdateModelElementCommand(
+ this.diagram.model.id, this.oid, this
+ .createTransferObject());
+ m_commandsController.submitCommand(command);
+ };
+
+ /**
+ *
+ */
Connection.prototype.hide = function() {
this.path.hide();
this.visible = false;
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 b137914..b42e303 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 @@ -516,10 +516,10 @@ define( Diagram.prototype.findConnection = function(conn) {
for ( var i = 0; i < this.connections.length; i++) {
- if (this.connections[i].fromModelElementOid == conn.fromModelElementOid
- && this.connections[i].toModelElementOid == conn.toModelElementOid) {
+ if (this.connections[i].oid == conn.oid) {
return this.connections[i];
- } else if (this.connections[i].oid == conn.oid) {
+ } else if (this.connections[i].fromModelElementOid == conn.fromModelElementOid
+ && this.connections[i].toModelElementOid == conn.toModelElementOid) {
return this.connections[i];
}
}
diff --git a/web-modeler/src/main/resources/META-INF/xhtml/js/m_symbol.js b/web-modeler/src/main/resources/META-INF/xhtml/js/m_symbol.js index 6967aa9..63db1cd 100644 --- a/web-modeler/src/main/resources/META-INF/xhtml/js/m_symbol.js +++ b/web-modeler/src/main/resources/META-INF/xhtml/js/m_symbol.js @@ -1835,7 +1835,7 @@ define( .setSecondAnchorPoint(this.dragConnection.toAnchorPoint);
}
- this.dragConnection.remove();
+ this.dragConnection.createDeleteCommand();
this.dragConnection = newConnection;
}
} else {
@@ -1848,10 +1848,7 @@ define( this.dragConnection.reroute();
- // TODO Create update method
-
- m_commandsController.submitImmediately(this.dragConnection
- .createUpdateCommand());
+ this.dragConnection.createUpdateCommand();
this.dragConnection.select();
this.dragConnection.toAnchorPoint.deselect();
|

