summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSidharth Singh2012-09-17 04:28:01 (EDT)
committerStephan Born2012-09-17 04:28:01 (EDT)
commit25f239d71c66c7c57a9f8266c2fa8898ee17935e (patch)
treee2919a93534f895f000630fbd8d56a12f9576a65
parentba4ea8f1185931579deea91116ad7fd2948bbb45 (diff)
downloadorg.eclipse.stardust.ui.web-25f239d71c66c7c57a9f8266c2fa8898ee17935e.zip
org.eclipse.stardust.ui.web-25f239d71c66c7c57a9f8266c2fa8898ee17935e.tar.gz
org.eclipse.stardust.ui.web-25f239d71c66c7c57a9f8266c2fa8898ee17935e.tar.bz2
CRNT-25997
1)Added method clearCurrentToolSelection in m_diagram.js which clears the currentAction on new action from toolbar 2)Added code in m_defaultPaletteHandler.js to call clearCurrentToolSelection() on m_diagram.js git-svn-id: http://emeafrazerg/svn/ipp/product/trunk/stardust/ui.web@59255 8100b5e0-4d52-466c-ae9c-bdeccbdeaf6b
-rw-r--r--web-modeler/src/main/resources/META-INF/xhtml/js/m_defaultPaletteHandler.js7
-rw-r--r--web-modeler/src/main/resources/META-INF/xhtml/js/m_diagram.js19
2 files changed, 26 insertions, 0 deletions
diff --git a/web-modeler/src/main/resources/META-INF/xhtml/js/m_defaultPaletteHandler.js b/web-modeler/src/main/resources/META-INF/xhtml/js/m_defaultPaletteHandler.js
index 2b09b65..6b33e86 100644
--- a/web-modeler/src/main/resources/META-INF/xhtml/js/m_defaultPaletteHandler.js
+++ b/web-modeler/src/main/resources/META-INF/xhtml/js/m_defaultPaletteHandler.js
@@ -38,36 +38,43 @@ define([ "m_utils", "m_constants", "m_messageDisplay",
},
createActivity : function(diagram) {
+ diagram.clearCurrentToolSelection();
selectTool("activityButton");
diagram.newSymbol = m_activitySymbol.createActivitySymbol(diagram,
m_constants.MANUAL_ACTIVITY_TYPE);
},
createSwimlane : function(diagram) {
+ diagram.clearCurrentToolSelection();
diagram.poolSymbol.createSwimlaneSymbol();
},
createStartEvent : function(diagram) {
+ diagram.clearCurrentToolSelection();
selectTool("startEventButton");
diagram.newSymbol = m_eventSymbol.createStartEventSymbol(diagram);
},
createEndEvent : function(diagram) {
+ diagram.clearCurrentToolSelection();
selectTool("endEventButton");
diagram.newSymbol = m_eventSymbol.createStopEventSymbol(diagram);
},
createData : function(diagram) {
+ diagram.clearCurrentToolSelection();
selectTool("dataButton");
diagram.newSymbol = m_dataSymbol.createDataSymbol(diagram);
},
createGateway : function(diagram) {
+ diagram.clearCurrentToolSelection();
selectTool("gatewayButton");
diagram.newSymbol = m_gatewaySymbol.createGatewaySymbol(diagram);
},
createConnector : function(diagram) {
+ diagram.clearCurrentToolSelection();
selectTool("connectorButton");
diagram.mode = diagram.CONNECTION_MODE;
m_messageDisplay
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 c9013c3..c93fa76 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
@@ -1567,6 +1567,25 @@ define(
};
/**
+ * Clears the current selected symbol/connection. New new action
+ * is made from toolbar(e.x Create Activity), old action(e.x
+ * create connecion) if in progess in removed
+ */
+ Diagram.prototype.clearCurrentToolSelection = function() {
+ this.clearCurrentSelection();
+ if (this.currentConnection != null) {
+ this.currentConnection.remove();
+
+ this.currentConnection = null;
+ }
+ if (this.newSymbol != null) {
+ this.newSymbol.remove();
+ this.newSymbol = null;
+ }
+ this.mode = this.NORMAL_MODE;
+ };
+
+ /**
*
*/
Diagram.prototype.showProcessPropertiesPanel = function() {