| author | Sidharth Singh | 2012-09-27 10:48:31 (EDT) |
|---|---|---|
| committer | Stephan Born | 2012-09-27 10:48:31 (EDT) |
| commit | 180c8af0f4c24d8ece2e113e98c9cce36bf56550 (patch) (side-by-side diff) | |
| tree | 0f22de228f563b56d3def89251e1f24d29aad044 | |
| parent | 816c5df5943bdf20420652e22ff846584160c72c (diff) | |
| download | org.eclipse.stardust.ui.web-180c8af0f4c24d8ece2e113e98c9cce36bf56550.zip org.eclipse.stardust.ui.web-180c8af0f4c24d8ece2e113e98c9cce36bf56550.tar.gz org.eclipse.stardust.ui.web-180c8af0f4c24d8ece2e113e98c9cce36bf56550.tar.bz2 | |
CRNT-26403
Made changes to dragStop of AnchorPoint in m_symbol.js
git-svn-id: http://emeafrazerg/svn/ipp/product/trunk/stardust/ui.web@59586 8100b5e0-4d52-466c-ae9c-bdeccbdeaf6b
| -rw-r--r-- | web-modeler/src/main/resources/META-INF/xhtml/js/m_symbol.js | 20 |
1 files changed, 16 insertions, 4 deletions
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 feef371..6d62a92 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 @@ -1950,6 +1950,18 @@ define( this.x, this.y);
if (symbol != null) {
+ // when more than one connection from same anchorPoint,
+ // prevent modification of other connection
+ for ( var n in this.symbol.connections) {
+ if (this.dragConnection.oid != this.symbol.connections[n].oid) {
+ if (this.symbol.connections[n].fromAnchorPoint == this) {
+ this.symbol.connections[n].fromAnchorPoint = this.originalAnchorPoint
+ } else if (this.symbol.connections[n].toAnchorPoint == this) {
+ this.symbol.connections[n].toAnchorPoint = this.originalAnchorPoint
+ }
+ }
+ }
+
var anchorPoint = symbol.getClosestAnchorPoint(this.x,
this.y, true);
var updateConnection = true;
@@ -2001,14 +2013,14 @@ define( // Reset the original Anchor Point in
// dragConnection to revert
if (this.dragConnection.originalFromAnchorPoint) {
- this.dragConnection.fromAnchorPoint = this.dragConnection.originalFromAnchorPoint;
+ this.dragConnection.fromAnchorPoint = this.originalAnchorPoint;
+ this.dragConnection.fromAnchorPointOrientation = this.originalAnchorPoint.orientation;
this.dragConnection.originalFromAnchorPoint = null;
} else if (this.dragConnection.originalToAnchorPoint) {
- this.dragConnection.toAnchorPoint = this.dragConnection.originalToAnchorPoint;
+ this.dragConnection.toAnchorPoint = this.originalAnchorPoint;
+ this.dragConnection.toAnchorPointOrientation = this.originalAnchorPoint.orientation;
this.dragConnection.originalToAnchorPoint = null;
}
- this.dragConnection.toAnchorPointOrientation = this.dragConnection.toAnchorPoint.orientation;
- this.dragConnection.fromAnchorPointOrientation = this.dragConnection.fromAnchorPoint.orientation;
this.moveTo(this.dragStartX,this.dragStartY);
updateConnection = false;
}
|

