summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSidharth Singh2012-11-01 07:19:17 (EDT)
committerSven Rottstock2012-11-01 07:19:17 (EDT)
commit2ceb5352eafe0c57285c66e4b7a546c73a2565c0 (patch)
treeb70413d441b6e4458aefa8e25e7874be6fb82a2a
parentf6c4b90e70c790e8d94427a2ad8523eae83bfddd (diff)
downloadorg.eclipse.stardust.ui.web-2ceb5352eafe0c57285c66e4b7a546c73a2565c0.zip
org.eclipse.stardust.ui.web-2ceb5352eafe0c57285c66e4b7a546c73a2565c0.tar.gz
org.eclipse.stardust.ui.web-2ceb5352eafe0c57285c66e4b7a546c73a2565c0.tar.bz2
CRNT-25149
Added check in containsPosition in m_swimlaneSymbol.js for swimlane top box height in y comparision Added code to remove current symbol if places on swimlane/pool margin. git-svn-id: http://emeafrazerg/svn/ipp/product/trunk/stardust/ui.web@60485 8100b5e0-4d52-466c-ae9c-bdeccbdeaf6b
-rw-r--r--web-modeler/src/main/resources/META-INF/xhtml/js/m_swimlaneSymbol.js4
-rw-r--r--web-modeler/src/main/resources/META-INF/xhtml/js/m_symbol.js13
2 files changed, 9 insertions, 8 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 bfd23ee..4dd67f4 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
@@ -945,7 +945,9 @@ define(
SwimlaneSymbol.prototype.containsPosition = function(x, y) {
// TODO Add recursion for nested swimlanes
- if (x > this.x && x < this.x + this.width && y > this.y
+ if (x > this.x
+ && x < this.x + this.width
+ && y > (this.y + m_constants.POOL_SWIMLANE_TOP_BOX_HEIGHT)
&& y < this.y + this.height) {
return true;
}
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 e076ce5..275dcda 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
@@ -207,6 +207,7 @@ define(
m_messageDisplay
.showErrorMessage("Symbol can only be dropped inside a expanded lane.");
this.diagram.hideSnapLines(this);
+ this.remove();
return;
} else {
this.parentSymbol.containedSymbols.push(this);
@@ -1025,6 +1026,7 @@ define(
Symbol.prototype.dragStop = function() {
if (this.diagram.mode == this.diagram.SYMBOL_MOVE_MODE) {
this.diagram.mode = this.diagram.NORMAL_MODE
+ this.diagram.dragEnabled = false;
this.showProximitySensor();
// Only process if symbol has been moved at all
if (this.x != this.dragStartX
@@ -1036,7 +1038,7 @@ define(
if (newParentSymbol == null) {
this.move(this.dragStartX, this.dragStartY);
-
+ this.diagram.hideSnapLines(this);
m_messageDisplay
.showErrorMessage("Symbol is not contained in Swimlane. Reverting drag.");
@@ -1368,10 +1370,6 @@ define(
- this.diagram.X_OFFSET, y
- this.diagram.Y_OFFSET);
}
- // If symbol is outside the swimlane, remove it
- if (!status) {
- this.remove();
- }
} else {
if (this.diagram.isInConnectionMode()) {
@@ -1733,8 +1731,9 @@ define(
function Symbol_clickClosure(event, x, y) {
this.auxiliaryProperties.callbackScope.click(x, y);
// Reset tool selection
- if (this.auxiliaryProperties.callbackScope.diagram
- .isInNormalMode()) {
+ if (this.auxiliaryProperties
+ && this.auxiliaryProperties.callbackScope.diagram
+ .isInNormalMode()) {
$(".selected-tool").removeClass("selected-tool");
}
}