From 919a0d0ed35c24b1047281723ddde2ac98fc9a3e Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Tue, 15 May 2012 22:36:44 -0700 Subject: document close handler. initial working draft Signed-off-by: Valerio Virgillito --- js/document/html-document.js | 39 --------------------------------------- 1 file changed, 39 deletions(-) (limited to 'js/document/html-document.js') diff --git a/js/document/html-document.js b/js/document/html-document.js index 9d083dd8..6a84abdf 100755 --- a/js/document/html-document.js +++ b/js/document/html-document.js @@ -971,45 +971,6 @@ exports.HTMLDocument = Montage.create(TextDocument, { this.application.ninja.undocontroller.redoQueue = this.redoStack.slice(0); - } - }, - //////////////////////////////////////////////////////////////////// - /** - *pause videos on switching or closing the document, so that the browser does not keep downloading the media data - */ - pauseVideos:{ - value:function(){ - var videosArr = this.documentRoot.getElementsByTagName("video"), i=0; - for(i=0;i --- js/document/html-document.js | 26 -------------------------- 1 file changed, 26 deletions(-) (limited to 'js/document/html-document.js') diff --git a/js/document/html-document.js b/js/document/html-document.js index 6a84abdf..68c2a9fb 100755 --- a/js/document/html-document.js +++ b/js/document/html-document.js @@ -920,32 +920,6 @@ exports.HTMLDocument = Montage.create(TextDocument, { } } }, - //////////////////////////////////////////////////////////////////// - saveAppState:{ - enumerable: false, - value: function () { - - this.savedLeftScroll = this.application.ninja.stage._iframeContainer.scrollLeft; - this.savedTopScroll = this.application.ninja.stage._iframeContainer.scrollTop; - - this.gridHorizontalSpacing = this.application.ninja.stage.drawUtils.gridHorizontalSpacing; - this.gridVerticalSpacing = this.application.ninja.stage.drawUtils.gridVerticalSpacing; - - if(typeof this.application.ninja.selectedElements !== 'undefined'){ - this.selectionModel = this.application.ninja.selectedElements.slice(0); - } - - this.draw3DGrid = this.application.ninja.appModel.show3dGrid; - - //persist a clone of history per document - this.undoStack = this.application.ninja.undocontroller.undoQueue.slice(0); - this.redoStack = this.application.ninja.undocontroller.redoQueue.slice(0); - this.application.ninja.undocontroller.clearHistory();//clear history to give the next document a fresh start - - //pause videos on switching or closing the document, so that the browser does not keep downloading the media data - this.pauseVideos(); - } - }, //////////////////////////////////////////////////////////////////// restoreAppState:{ -- cgit v1.2.3