summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSidharth Singh2012-09-27 05:20:05 (EDT)
committerStephan Born2012-09-27 05:20:05 (EDT)
commit2a4a22c9fb0cb066ff8b0c75770102b807f4c31b (patch)
tree65bb3c7787557e1074f8796990d31963c8104d0f
parent3331091b38d69d1b87de15daa6e77469195489ac (diff)
downloadorg.eclipse.stardust.ui.web-2a4a22c9fb0cb066ff8b0c75770102b807f4c31b.zip
org.eclipse.stardust.ui.web-2a4a22c9fb0cb066ff8b0c75770102b807f4c31b.tar.gz
org.eclipse.stardust.ui.web-2a4a22c9fb0cb066ff8b0c75770102b807f4c31b.tar.bz2
CRNT-26376
Made changes to logic of findPath in m_connection.js git-svn-id: http://emeafrazerg/svn/ipp/product/trunk/stardust/ui.web@59552 8100b5e0-4d52-466c-ae9c-bdeccbdeaf6b
-rw-r--r--web-modeler/src/main/resources/META-INF/xhtml/js/m_connection.js24
-rw-r--r--web-modeler/src/main/resources/META-INF/xhtml/js/m_diagram.js1
-rw-r--r--web-modeler/src/main/resources/META-INF/xhtml/js/m_symbol.js12
3 files changed, 21 insertions, 16 deletions
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 706ca72..00982a6 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
@@ -1024,7 +1024,7 @@ define(
|| (currentSegment.fromX > currentSegment.toX && currentSegment.toX > targetX)) {
if (this.toAnchorPoint.symbol != null
- && this.toAnchorPoint.symbol.type != m_constants.SWIMLANE_SYMBOL) {
+ && this.toAnchorPoint.symbol.type != m_constants.SWIMLANE_SYMBOL && !this.diagram.anchorDragEnabled) {
// the Anchor point bend location should be midway
// between symbol's
if(n==0){
@@ -1076,10 +1076,11 @@ define(
- m_constants.CONNECTION_MINIMAL_SEGMENT_LENGTH,
currentSegment));
}
- // Intermediate Horizontal segment from 9 o'clk to 9
+ // Intermediate Horizontal segment from 9
+ // o'clk to 9
// o'clk towards right
- else if ((currentSegment.toX < targetX && targetX > this.toAnchorPoint.x)
- && (this.toAnchorPoint.symbol != null)) {
+ else if (currentSegment.toX < targetX
+ && targetX > this.toAnchorPoint.x) {
this.segments
.push(currentSegment = new Segment(
currentSegment.toX,
@@ -1091,8 +1092,8 @@ define(
}
// Horizontal segment from 9 o'clk to 9
// o'clk towards left
- else if ((currentSegment.toX > targetX && targetX < this.toAnchorPoint.x)
- && (this.toAnchorPoint.symbol != null)) {
+ else if (currentSegment.toX > targetX
+ && targetX < this.toAnchorPoint.x) {
this.segments
.push(currentSegment = new Segment(
currentSegment.toX,
@@ -1110,7 +1111,7 @@ define(
// connect from 6 O'clk to 12 O'clk, when toX
// and TargetX match,
// the vertical segment needs modification
- if (this.toAnchorPoint.symbol != null
+ if (this.toAnchorPoint.symbol != null && !this.diagram.anchorDragEnabled
&& (currentSegment.toY > targetY && this.toAnchorPoint.y > targetY)) {
if (currentSegment.fromX > currentSegment.toX) {
currentSegment.toX = this.toAnchorPoint.symbol.x
@@ -1139,7 +1140,7 @@ define(
if ((currentSegment.fromY < currentSegment.toY && currentSegment.toY < targetY)
|| (currentSegment.fromY > currentSegment.toY && currentSegment.toY > targetY)) {
if (this.toAnchorPoint.symbol != null
- && this.toAnchorPoint.symbol.type != m_constants.SWIMLANE_SYMBOL) {
+ && this.toAnchorPoint.symbol.type != m_constants.SWIMLANE_SYMBOL && !this.diagram.anchorDragEnabled) {
if (n == 0) {
// the bend location should be midway between symbols, update current
@@ -1200,8 +1201,7 @@ define(
- m_constants.CONNECTION_MINIMAL_SEGMENT_LENGTH,
currentSegment.toY,
currentSegment));
- } else if ((currentSegment.toY > targetY && targetY < this.toAnchorPoint.y)
- && (this.toAnchorPoint.symbol != null)) {
+ } else if (currentSegment.toY > targetY && targetY < this.toAnchorPoint.y) {
// Intermediate vertical lines,
// connecting to 12 O'clk segment
this.segments
@@ -1218,7 +1218,7 @@ define(
} else
currentSegment.toY = targetY;
} else {
- if (this.toAnchorPoint.symbol != null
+ if (this.toAnchorPoint.symbol != null && !this.diagram.anchorDragEnabled
&& ((currentSegment.toX < this.fromAnchorPoint.symbol.x) && this.toAnchorPoint.symbol.x
+ this.toAnchorPoint.symbol.width < targetX)) {
this.segments
@@ -1229,7 +1229,7 @@ define(
- m_constants.CONNECTION_MINIMAL_SEGMENT_LENGTH,
currentSegment.toY,
currentSegment));
- }else if (this.toAnchorPoint.symbol != null
+ }else if (this.toAnchorPoint.symbol != null && !this.diagram.anchorDragEnabled
&& ((currentSegment.toX >= (this.fromAnchorPoint.symbol.x + this.fromAnchorPoint.symbol.width)) && this.toAnchorPoint.symbol.x
> targetX)) {
this.segments
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 e7470f3..f4d0595 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
@@ -75,6 +75,7 @@ define(
this.mode = this.NORMAL_MODE;
this.symbols = [];
this.dragEnabled = null;
+ this.anchorDragEnabled = null;
// Activity symbols by OIDs
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 faeec35..feef371 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
@@ -1026,6 +1026,7 @@ define(
|| this.diagram.currentConnection != null
|| this.diagram.currentSelection.length > 0 || this.diagram.newSymbol)
|| this.diagram.dragEnabled
+ || this.diagram.anchorDragEnabled
|| this.type == null
|| (this.type && (this.type.toLowerCase()
.indexOf(
@@ -1056,6 +1057,7 @@ define(
return true;
}
+
} catch (e) {
return false;
}
@@ -1913,7 +1915,7 @@ define(
this.dragStartX = this.x;
this.dragStartY = this.y;
// Flag required to hide flyout menu's in Drag and Drop
- this.symbol.diagram.dragEnabled = true;
+ this.symbol.diagram.anchorDragEnabled = true;
// Replace and anchor point and keep reference
@@ -1937,7 +1939,8 @@ define(
if (this.dragConnection == null) {
return;
}
-
+ // dragEnabled flag is used to hide flyout menu in Drag mode
+ this.symbol.diagram.anchorDragEnabled = false;
if (this.lastDragOverSymbol != null) {
this.lastDragOverSymbol.hideAnchorPoints();
}
@@ -2028,8 +2031,6 @@ define(
this.dragConnection.select();
this.dragConnection.toAnchorPoint.deselect();
- // dragEnabled flag is used to hide flyout menu in Drag mode
- this.symbol.diagram.dragEnabled = false;
}
/**
@@ -2051,14 +2052,17 @@ define(
}
function AnchorPoint_clickClosure() {
+ if(this.auxiliaryProperties)
this.auxiliaryProperties.anchorPoint.select();
}
function AnchorPoint_hoverInClosure() {
+ if(this.auxiliaryProperties)
this.auxiliaryProperties.anchorPoint.hoverIn();
}
function AnchorPoint_hoverOutClosure() {
+ if(this.auxiliaryProperties)
this.auxiliaryProperties.anchorPoint.hoverOut();
}