aboutsummaryrefslogtreecommitdiff
path: root/js/document
diff options
context:
space:
mode:
authorAnanya Sen2012-02-29 13:56:35 -0800
committerAnanya Sen2012-02-29 13:56:35 -0800
commitccedeef38d6eb2e55d1782b82401828f3c99dd9c (patch)
treed7e64d100b9b2e6cf6cf8abb0a8ffb696d12d6e3 /js/document
parent7a259f8c78a2394e32c62654623285ee595c6249 (diff)
parent84d6f6f5518e5ef8fc3d68be7e41c510f57b597a (diff)
downloadninja-ccedeef38d6eb2e55d1782b82401828f3c99dd9c.tar.gz
Merge pull request #4 from mqg734/AnanyaFileIO
Fix for selection bug due to bad scrollLeft and scrollTop values when switching between documents.
Diffstat (limited to 'js/document')
-rwxr-xr-xjs/document/html-document.js7
1 files changed, 3 insertions, 4 deletions
diff --git a/js/document/html-document.js b/js/document/html-document.js
index 9dcea8cb..544c0ad5 100755
--- a/js/document/html-document.js
+++ b/js/document/html-document.js
@@ -719,15 +719,14 @@ exports.HTMLDocument = Montage.create(TextDocument, {
719 719
720 720
721 721
722 if((this.savedLeftScroll!== null) && (this.savedTopScroll !== null)){ 722 if((this.savedLeftScroll !== null) && (this.savedTopScroll !== null)){
723 this.application.ninja.stage._iframeContainer.scrollLeft = this.savedLeftScroll; 723 this.application.ninja.stage._iframeContainer.scrollLeft = this.savedLeftScroll;
724 this.application.ninja.stage._scrollLeft = this.savedLeftScroll;
725 this.application.ninja.stage._iframeContainer.scrollTop = this.savedTopScroll; 724 this.application.ninja.stage._iframeContainer.scrollTop = this.savedTopScroll;
726 this.application.ninja.stage._scrollLeft = this.savedTopScroll; 725 this.application.ninja.stage.handleScroll();
727 } 726 }
728 727
729 this.application.ninja.currentSelectedContainer = this.documentRoot; 728 this.application.ninja.currentSelectedContainer = this.documentRoot;
730 if((typeof this.selectionModel !== 'undefined') && (this.selectionModel !== null)){ 729 if(this.selectionModel){
731 this.application.ninja.selectedElements = this.selectionModel.slice(0); 730 this.application.ninja.selectedElements = this.selectionModel.slice(0);
732 } 731 }
733 732