aboutsummaryrefslogtreecommitdiff
path: root/js/helper-classes
diff options
context:
space:
mode:
authorValerio Virgillito2012-03-08 13:39:11 -0800
committerValerio Virgillito2012-03-08 13:39:11 -0800
commit5940b22e01de4fc36e5c5de5f3ed074f08fadb07 (patch)
tree72a5592ef65b3238b31f0e9954b2ad8d1778eeac /js/helper-classes
parent9b006acf1f6c2be5abc54f94a8bee7e684f106f9 (diff)
parent130cd6d4b99c9db344ec0ab44a54a59d11b31d2f (diff)
downloadninja-5940b22e01de4fc36e5c5de5f3ed074f08fadb07.tar.gz
Merge pull request #104 from ananyasen/integration-candidate
IKNINJA-1270: fixed browser crashing when you close a document while playing a video
Diffstat (limited to 'js/helper-classes')
-rwxr-xr-xjs/helper-classes/3D/draw-utils.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/js/helper-classes/3D/draw-utils.js b/js/helper-classes/3D/draw-utils.js
index 02d946ae..63e7799a 100755
--- a/js/helper-classes/3D/draw-utils.js
+++ b/js/helper-classes/3D/draw-utils.js
@@ -112,6 +112,7 @@ var DrawUtils = exports.DrawUtils = Montage.create(Component, {
112 this.eventManager.addEventListener("elementDeleted", this, false); 112 this.eventManager.addEventListener("elementDeleted", this, false);
113 this.eventManager.addEventListener("deleteSelection", this, false); 113 this.eventManager.addEventListener("deleteSelection", this, false);
114 this.eventManager.addEventListener("elementChange", this, false); 114 this.eventManager.addEventListener("elementChange", this, false);
115 this.eventManager.addEventListener("closeDocument", this, false);
115 } 116 }
116 }, 117 },
117 118
@@ -135,6 +136,15 @@ var DrawUtils = exports.DrawUtils = Montage.create(Component, {
135 } 136 }
136 }, 137 },
137 138
139 handleCloseDocument:{
140 value: function() {
141 if(this.application.ninja.documentController._documents.length === 0){
142 this._eltArray = [];
143 this._planesArray = [];
144 }
145 }
146 },
147
138 handleElementAdded: { 148 handleElementAdded: {
139 value: function(event) { 149 value: function(event) {
140 this.addElement(event.detail); 150 this.addElement(event.detail);