summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSidharth Singh2012-11-23 04:34:41 (EST)
committer Sven Rottstock2012-11-23 04:34:41 (EST)
commit72c3adb04d435763b53e262bfc9c72decaf9c28d (patch)
tree48474247681de5387b9d3a27530a4439f5285758
parentb2a92d6aa1bbb4ec63b0c78efabea98cb0247e53 (diff)
downloadorg.eclipse.stardust.ui.web-72c3adb04d435763b53e262bfc9c72decaf9c28d.zip
org.eclipse.stardust.ui.web-72c3adb04d435763b53e262bfc9c72decaf9c28d.tar.gz
org.eclipse.stardust.ui.web-72c3adb04d435763b53e262bfc9c72decaf9c28d.tar.bz2
CRNT-27047
Made changes to the logic of adjustToSymbolBoundaries in m_swimlaneSymbol.js for Drag Drop symbol git-svn-id: http://emeafrazerg/svn/ipp/product/trunk/stardust/ui.web@61071 8100b5e0-4d52-466c-ae9c-bdeccbdeaf6b
-rw-r--r--web-modeler/src/main/resources/META-INF/xhtml/js/m_swimlaneSymbol.js36
-rw-r--r--web-modeler/src/main/resources/META-INF/xhtml/js/m_symbol.js17
2 files changed, 23 insertions, 30 deletions
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 7b5e2c2..e106b20 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
@@ -1061,30 +1061,30 @@ define(
// If Symbol is moved beyond the starting Y margin and
// Height has increased, calculate the height change to move
// Symbol
- if (parseInt(preAdjustmentPos.y) > (parseInt(y))
- && parseInt(this.height) > parseInt(preAdjustmentPos.height
- .valueOf())) {
- moveY = this.height - parseInt(preAdjustmentPos.height);
-
- }else if (this.y < preAdjustmentPos.y
- && this.height > preAdjustmentPos.height) {
- this.y = preAdjustmentPos.y;
- moveY = this.heigth - parseInt(preAdjustmentPos.height);
+ if (this.height > preAdjustmentPos.height) {
+ if ((parseInt(preAdjustmentPos.y) > parseInt(y))
+ || this.y < preAdjustmentPos.y) {
+ moveY = this.height
+ - parseInt(preAdjustmentPos.height)
+ }
+ if (this.height > preAdjustmentPos.height) {
+ this.y = preAdjustmentPos.y;
+ }
}
// If Symbol is moved beyond the starting X margin and
- // Height has increased, calculate the width change to move
+ // width has increased, calculate the width change to move
// Symbol
- if (parseInt(preAdjustmentPos.x) > (parseInt(x))
- && parseInt(this.width) > parseInt(preAdjustmentPos.width
- .valueOf())) {
- moveX = this.width - parseInt(preAdjustmentPos.width);
-
- }else if (this.x < preAdjustmentPos.x
- && this.width > preAdjustmentPos.width) {
+ if (this.width > preAdjustmentPos.width) {
+ if ((preAdjustmentPos.x > parseInt(x))
+ || (this.x < preAdjustmentPos.x)) {
+ moveX = this.width
+ - parseInt(preAdjustmentPos.width);
+ }
+ if (this.x < preAdjustmentPos.x) {
this.x = preAdjustmentPos.x;
- moveX = this.width - parseInt(preAdjustmentPos.width);
}
+ }
if (moveX > 0 || moveY > 0) {
for ( var n in this.containedSymbols) {
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 88356a1..7a69094 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
@@ -1068,19 +1068,7 @@ define(
}
this.diagram.snapSymbol(this);
- this.parentSymbol.adjustToSymbolBoundaries(
- this.x, this.y);
- // Other parts of the diagram may have been
- // affected
- // - update the diagram
-
- // this.diagram.submitUpdate();
- var oldGeometry = {
- "x" : this.dragStartX,
- "y" : this.dragStartY,
- "oid" : this.oid
- };
var newGeometry = {
"x" : this.x
+ this.parentSymbol.symbolXOffset,
@@ -1093,7 +1081,12 @@ define(
.createMoveNodeSymbolCommand(
this.diagram.model.id,
this.oid, newGeometry);
+ command.sync = true;
m_commandsController.submitCommand(command);
+
+ this.parentSymbol.adjustToSymbolBoundaries(
+ this.x, this.y);
+
} else {
this.diagram.snapSymbol(this);