diff options
author | Armen Kesablyan | 2012-05-17 14:01:38 -0700 |
---|---|---|
committer | Armen Kesablyan | 2012-05-17 14:01:38 -0700 |
commit | 6c8f3525b839e82cf43df43700a0160ee2c5458f (patch) | |
tree | 3fb801fa54b759c5568d75bb467e02652ce77c3e /js/document/html-document.js | |
parent | e8ae5db7ce7023b638375cbc27a3f7b7a2f77b23 (diff) | |
parent | 342c97ac9b727b22a7b0bfefca4d2a168bc3055b (diff) | |
download | ninja-6c8f3525b839e82cf43df43700a0160ee2c5458f.tar.gz |
Merge branch 'refs/heads/dom-architecture' into binding
Conflicts:
css/ninja.css
scss/imports/scss/_toolbar.scss
Signed-off-by: Armen Kesablyan <armen@motorola.com>
Diffstat (limited to 'js/document/html-document.js')
-rwxr-xr-x | js/document/html-document.js | 65 |
1 files changed, 0 insertions, 65 deletions
diff --git a/js/document/html-document.js b/js/document/html-document.js index 9d083dd8..68c2a9fb 100755 --- a/js/document/html-document.js +++ b/js/document/html-document.js | |||
@@ -920,32 +920,6 @@ exports.HTMLDocument = Montage.create(TextDocument, { | |||
920 | } | 920 | } |
921 | } | 921 | } |
922 | }, | 922 | }, |
923 | //////////////////////////////////////////////////////////////////// | ||
924 | saveAppState:{ | ||
925 | enumerable: false, | ||
926 | value: function () { | ||
927 | |||
928 | this.savedLeftScroll = this.application.ninja.stage._iframeContainer.scrollLeft; | ||
929 | this.savedTopScroll = this.application.ninja.stage._iframeContainer.scrollTop; | ||
930 | |||
931 | this.gridHorizontalSpacing = this.application.ninja.stage.drawUtils.gridHorizontalSpacing; | ||
932 | this.gridVerticalSpacing = this.application.ninja.stage.drawUtils.gridVerticalSpacing; | ||
933 | |||
934 | if(typeof this.application.ninja.selectedElements !== 'undefined'){ | ||
935 | this.selectionModel = this.application.ninja.selectedElements.slice(0); | ||
936 | } | ||
937 | |||
938 | this.draw3DGrid = this.application.ninja.appModel.show3dGrid; | ||
939 | |||
940 | //persist a clone of history per document | ||
941 | this.undoStack = this.application.ninja.undocontroller.undoQueue.slice(0); | ||
942 | this.redoStack = this.application.ninja.undocontroller.redoQueue.slice(0); | ||
943 | this.application.ninja.undocontroller.clearHistory();//clear history to give the next document a fresh start | ||
944 | |||
945 | //pause videos on switching or closing the document, so that the browser does not keep downloading the media data | ||
946 | this.pauseVideos(); | ||
947 | } | ||
948 | }, | ||
949 | 923 | ||
950 | //////////////////////////////////////////////////////////////////// | 924 | //////////////////////////////////////////////////////////////////// |
951 | restoreAppState:{ | 925 | restoreAppState:{ |
@@ -972,44 +946,5 @@ exports.HTMLDocument = Montage.create(TextDocument, { | |||
972 | 946 | ||
973 | 947 | ||
974 | } | 948 | } |
975 | }, | ||
976 | //////////////////////////////////////////////////////////////////// | ||
977 | /** | ||
978 | *pause videos on switching or closing the document, so that the browser does not keep downloading the media data | ||
979 | */ | ||
980 | pauseVideos:{ | ||
981 | value:function(){ | ||
982 | var videosArr = this.documentRoot.getElementsByTagName("video"), i=0; | ||
983 | for(i=0;i<videosArr.length;i++){ | ||
984 | if(!videosArr[i].paused){ | ||
985 | videosArr[i].pause(); | ||
986 | } | ||
987 | } | ||
988 | } | ||
989 | }, | ||
990 | |||
991 | /** | ||
992 | * remove the video src on closing the document, so that the browser does not keep downloading the media data, if the tag does not get garbage collected | ||
993 | *removeSrc : boolean to remove the src if the video... set only in the close document flow | ||
994 | */ | ||
995 | stopVideos:{ | ||
996 | value:function(){ | ||
997 | var videosArr = this.documentRoot.getElementsByTagName("video"), i=0; | ||
998 | for(i=0;i<videosArr.length;i++){ | ||
999 | videosArr[i].src = ""; | ||
1000 | } | ||
1001 | } | ||
1002 | }, | ||
1003 | pauseAndStopVideos:{ | ||
1004 | value:function(){ | ||
1005 | var videosArr = this.documentRoot.getElementsByTagName("video"), i=0; | ||
1006 | for(i=0;i<videosArr.length;i++){ | ||
1007 | if(!videosArr[i].paused){ | ||
1008 | videosArr[i].pause(); | ||
1009 | } | ||
1010 | videosArr[i].src = ""; | ||
1011 | } | ||
1012 | } | ||
1013 | } | 949 | } |
1014 | //////////////////////////////////////////////////////////////////// | ||
1015 | }); \ No newline at end of file | 950 | }); \ No newline at end of file |