aboutsummaryrefslogtreecommitdiff
path: root/js/document
diff options
context:
space:
mode:
authorAnanya Sen2012-02-28 15:15:27 -0800
committerAnanya Sen2012-02-28 15:15:27 -0800
commit5ab7efb9949e486395659c383064a08821febdae (patch)
tree69c91481dee42ab59dca874815d0d283bf52e8c4 /js/document
parent676b4e2d7091ac63ce06f51be686b902b940bfff (diff)
downloadninja-5ab7efb9949e486395659c383064a08821febdae.tar.gz
persist selections while switching documents
Signed-off-by: Ananya Sen <Ananya.Sen@motorola.com>
Diffstat (limited to 'js/document')
-rwxr-xr-xjs/document/html-document.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/js/document/html-document.js b/js/document/html-document.js
index 75628731..0e74914a 100755
--- a/js/document/html-document.js
+++ b/js/document/html-document.js
@@ -677,7 +677,7 @@ exports.HTMLDocument = Montage.create(TextDocument, {
677 this.gridVerticalSpacing = this.application.ninja.stage.drawUtils.gridVerticalSpacing; 677 this.gridVerticalSpacing = this.application.ninja.stage.drawUtils.gridVerticalSpacing;
678 678
679 if(typeof this.application.ninja.selectedElements !== 'undefined'){ 679 if(typeof this.application.ninja.selectedElements !== 'undefined'){
680 this.selectionModel = this.application.ninja.selectedElements; 680 this.selectionModel = this.application.ninja.selectedElements.slice(0);
681 } 681 }
682 682
683 this.draw3DGrid = this.application.ninja.appModel.show3dGrid; 683 this.draw3DGrid = this.application.ninja.appModel.show3dGrid;
@@ -691,8 +691,8 @@ exports.HTMLDocument = Montage.create(TextDocument, {
691 this.application.ninja.stage.drawUtils.gridHorizontalSpacing = this.gridHorizontalSpacing; 691 this.application.ninja.stage.drawUtils.gridHorizontalSpacing = this.gridHorizontalSpacing;
692 this.application.ninja.stage.drawUtils.gridVerticalSpacing = this.gridVerticalSpacing; 692 this.application.ninja.stage.drawUtils.gridVerticalSpacing = this.gridVerticalSpacing;
693 693
694 if((typeof this.selectionModel !== 'undefined') && (this.selectionModel !== null) && (this.selectionModel.length > 0)){ 694 if((typeof this.selectionModel !== 'undefined') && (this.selectionModel !== null)){
695 this.application.ninja.selectionController.initWithDocument(this.selectionModel); 695 this.application.ninja.selectedElements = this.selectionModel.slice(0);
696 } 696 }
697 697
698 if((this.savedLeftScroll!== null) && (this.savedTopScroll !== null)){ 698 if((this.savedLeftScroll!== null) && (this.savedTopScroll !== null)){