| author | Sidharth Singh | 2012-09-28 07:49:47 (EDT) |
|---|---|---|
| committer | Robert Sauer | 2012-09-28 07:49:47 (EDT) |
| commit | 40dcead2105cd1bd026b3a7bef1e32139d5f4fdf (patch) (side-by-side diff) | |
| tree | fd56fef576feb8b62790643e621a27777ca5832d | |
| parent | 89cd32a474e9ddbaeb6d04bfb311d52e0b25bad4 (diff) | |
| download | org.eclipse.stardust.ui.web-40dcead2105cd1bd026b3a7bef1e32139d5f4fdf.zip org.eclipse.stardust.ui.web-40dcead2105cd1bd026b3a7bef1e32139d5f4fdf.tar.gz org.eclipse.stardust.ui.web-40dcead2105cd1bd026b3a7bef1e32139d5f4fdf.tar.bz2 | |
CRNT-26097
Moved the code to remove the element before the modification call happens in processCommand
git-svn-id: http://emeafrazerg/svn/ipp/product/trunk/stardust/ui.web@59619 8100b5e0-4d52-466c-ae9c-bdeccbdeaf6b
| -rw-r--r-- | web-modeler/src/main/resources/META-INF/xhtml/js/m_diagram.js | 36 |
1 files changed, 17 insertions, 19 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 f4d0595..59eb804 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 @@ -644,7 +644,23 @@ define( if (null != obj && null != obj.changes) {
- // TODO is lastSymbol still needed
+ // Delete removed elements
+ for ( var i = 0; i < obj.changes.removed.length; i++) {
+ var symbol = this
+ .findSymbolByGuid(obj.changes.removed[i].oid);
+ if (null == symbol) {
+ symbol = this
+ .findSymbolByModelElementGuid(obj.changes.removed[i].oid);
+ }
+ if (null == symbol) {
+ symbol = this
+ .findConnectionByGuid(obj.changes.removed[i].oid);
+ }
+ if (null != symbol) {
+ symbol.remove();
+ }
+
+ }
//Run the added loop to add all data symbols except connections
//For which the loop is run again - to make sure all connected symbols are
@@ -797,24 +813,6 @@ define( this.animationDelay = 0;
this.animationEasing = null;
-
- // Delete removed elements
- for ( var i = 0; i < obj.changes.removed.length; i++) {
- var symbol = this
- .findSymbolByGuid(obj.changes.removed[i].oid);
- if (null == symbol) {
- symbol = this
- .findSymbolByModelElementGuid(obj.changes.removed[i].oid);
- }
- if (null == symbol) {
- symbol = this
- .findConnectionByGuid(obj.changes.removed[i].oid);
- }
- if (null != symbol) {
- symbol.remove();
- }
-
- }
}
this.lastSymbol = null;
};
|

