| author | Sidharth Singh | 2012-11-16 01:31:07 (EST) |
|---|---|---|
| committer | Sven Rottstock | 2012-11-16 01:31:07 (EST) |
| commit | b1ffb51d74a579769e0e4075db9ce7c2b7c3caa0 (patch) (side-by-side diff) | |
| tree | beeb15a28082ae8d934a7fb6ad95ab260e4bc800 | |
| parent | 23bb600e4fc5b14a61521b12f643b29a571f2478 (diff) | |
| download | org.eclipse.stardust.ui.web-b1ffb51d74a579769e0e4075db9ce7c2b7c3caa0.zip org.eclipse.stardust.ui.web-b1ffb51d74a579769e0e4075db9ce7c2b7c3caa0.tar.gz org.eclipse.stardust.ui.web-b1ffb51d74a579769e0e4075db9ce7c2b7c3caa0.tar.bz2 | |
CRNT-27013
Added Null check for toAnchorPoint.symbol in reroute of m_connection.js
git-svn-id: http://emeafrazerg/svn/ipp/product/trunk/stardust/ui.web@60867 8100b5e0-4d52-466c-ae9c-bdeccbdeaf6b
| -rw-r--r-- | web-modeler/src/main/resources/META-INF/xhtml/js/m_connection.js | 24 |
1 files changed, 16 insertions, 8 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 9f9590c..a981855 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 @@ -874,14 +874,22 @@ define( left: this.fromAnchorPoint.symbol.x - m_constants.CONNECTION_MINIMAL_SEGMENT_LENGTH,
top: this.fromAnchorPoint.symbol.y - m_constants.CONNECTION_MINIMAL_SEGMENT_LENGTH,
right: this.fromAnchorPoint.symbol.x + this.fromAnchorPoint.symbol.width + m_constants.CONNECTION_MINIMAL_SEGMENT_LENGTH,
- bottom: this.fromAnchorPoint.symbol.y + this.fromAnchorPoint.symbol.height + m_constants.CONNECTION_MINIMAL_SEGMENT_LENGTH,
- };
- var targetBox = {
- left: this.toAnchorPoint.symbol.x - m_constants.CONNECTION_MINIMAL_SEGMENT_LENGTH,
- top: this.toAnchorPoint.symbol.y - m_constants.CONNECTION_MINIMAL_SEGMENT_LENGTH,
- right: this.toAnchorPoint.symbol.x + this.toAnchorPoint.symbol.width + m_constants.CONNECTION_MINIMAL_SEGMENT_LENGTH,
- bottom: this.toAnchorPoint.symbol.y + this.toAnchorPoint.symbol.height + m_constants.CONNECTION_MINIMAL_SEGMENT_LENGTH,
+ bottom: this.fromAnchorPoint.symbol.y + this.fromAnchorPoint.symbol.height + m_constants.CONNECTION_MINIMAL_SEGMENT_LENGTH
};
+ if (this.toAnchorPoint.symbol != null) {
+ var targetBox = {
+ left : this.toAnchorPoint.symbol.x
+ - m_constants.CONNECTION_MINIMAL_SEGMENT_LENGTH,
+ top : this.toAnchorPoint.symbol.y
+ - m_constants.CONNECTION_MINIMAL_SEGMENT_LENGTH,
+ right : this.toAnchorPoint.symbol.x
+ + this.toAnchorPoint.symbol.width
+ + m_constants.CONNECTION_MINIMAL_SEGMENT_LENGTH,
+ bottom : this.toAnchorPoint.symbol.y
+ + this.toAnchorPoint.symbol.height
+ + m_constants.CONNECTION_MINIMAL_SEGMENT_LENGTH
+ };
+ }
var offset;
var sourceX;
@@ -906,7 +914,7 @@ define( // ensure first/last segment extends beyond both source and target symbol
offset = {
dx: fromOffset.dx >= toOffset.dx ? fromOffset.dx : toOffset.dx,
- dy: fromOffset.dy >= toOffset.dy ? fromOffset.dy : toOffset.dy,
+ dy: fromOffset.dy >= toOffset.dy ? fromOffset.dy : toOffset.dy
};
} else {
offset = {
|

