| author | Sidharth Singh | 2012-10-11 07:47:36 (EDT) |
|---|---|---|
| committer | Manik Kishore | 2012-10-11 07:47:36 (EDT) |
| commit | 95f116e1e1b63c0ee8f3f1a9990716b70e6daf94 (patch) (side-by-side diff) | |
| tree | c028aabb3731d78dc4f3b54bbfb2b01d86351d99 | |
| parent | 7f7ea7f614dc6b2c4ad5cc889e97351ebfabf05b (diff) | |
| download | org.eclipse.stardust.ui.web-95f116e1e1b63c0ee8f3f1a9990716b70e6daf94.zip org.eclipse.stardust.ui.web-95f116e1e1b63c0ee8f3f1a9990716b70e6daf94.tar.gz org.eclipse.stardust.ui.web-95f116e1e1b63c0ee8f3f1a9990716b70e6daf94.tar.bz2 | |
CRNT-26594
Added check to prevent connection on PoolSymbol.
git-svn-id: http://emeafrazerg/svn/ipp/product/trunk/stardust/ui.web@59943 8100b5e0-4d52-466c-ae9c-bdeccbdeaf6b
3 files changed, 24 insertions, 10 deletions
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 97c6ff7..a2a3caf 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 @@ -476,7 +476,7 @@ define( m_autoScrollManager.initScrollManager("scrollpane", function() {
var inAutoScrollMode = false;
if (null != currentDiagram.newSymbol
- && currentDiagram.newSymbol.type == m_constants.POOL_SYMBOL) {
+ && currentDiagram.newSymbol.isPoolSymbol()) {
// For Default Pool drag and drop is not allowed.
inAutoScrollMode = false;
}else if (true == currentDiagram.isInConnectionMode()
diff --git a/web-modeler/src/main/resources/META-INF/xhtml/js/m_drawable.js b/web-modeler/src/main/resources/META-INF/xhtml/js/m_drawable.js index ff19189..b0e8524 100644 --- a/web-modeler/src/main/resources/META-INF/xhtml/js/m_drawable.js +++ b/web-modeler/src/main/resources/META-INF/xhtml/js/m_drawable.js @@ -281,8 +281,7 @@ define( if (this.diagram.currentFlyOutSymbol) {
return;
} else if (this.type
- && (this.type.toLowerCase().indexOf(
- m_constants.POOL_SYMBOL.toLowerCase()) > -1 || this.type == m_constants.SWIMLANE_SYMBOL)) {
+ && (this.isPoolSymbol() || this.type == m_constants.SWIMLANE_SYMBOL)) {
// do nothing
} else {
this.diagram.currentFlyOutSymbol = this;
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 c424ee7..aee9167 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 @@ -164,6 +164,18 @@ define( };
/**
+ * For PoolSymbol, there is no JSON response, so type changes to
+ * modelElement.getClass() on server roundTrip, added manual
+ * check for type containing text POOLSYMBOL
+ */
+ Symbol.prototype.isPoolSymbol = function() {
+ if(this.type && (this.type.toLowerCase().indexOf(m_constants.POOL_SYMBOL.toLowerCase()) > -1)){
+ return true;
+ }
+ return false;
+ };
+
+ /**
*
*/
Symbol.prototype.requiresParentSymbol = function() {
@@ -1279,13 +1291,16 @@ define( }
} else {
if (this.diagram.isInConnectionMode()) {
- this.diagram.setAnchorPoint(this
- .getClosestAnchorPoint(x
- * this.diagram.zoomFactor
- - this.diagram.X_OFFSET, y
- * this.diagram.zoomFactor
- - this.diagram.Y_OFFSET));
- this.hideAnchorPoints();
+
+ if (!this.isPoolSymbol()) {
+ this.diagram.setAnchorPoint(this
+ .getClosestAnchorPoint(x
+ * this.diagram.zoomFactor
+ - this.diagram.X_OFFSET, y
+ * this.diagram.zoomFactor
+ - this.diagram.Y_OFFSET));
+ this.hideAnchorPoints();
+ }
} else {
this.select();
}
|

