diff options
author | Ananya Sen | 2012-02-29 11:46:19 -0800 |
---|---|---|
committer | Ananya Sen | 2012-02-29 11:46:19 -0800 |
commit | 03ea76700cb8bee3f4f58acf3e3503b0642d13fb (patch) | |
tree | 74995df24eb96461c6f7aa3287239ce550bab567 /js/document | |
parent | 7a9c2a91dfbbdd0cd7c79d81be5aeecd7887e7f1 (diff) | |
download | ninja-03ea76700cb8bee3f4f58acf3e3503b0642d13fb.tar.gz |
fixed selection which click after switching to a document
Signed-off-by: Ananya Sen <Ananya.Sen@motorola.com>
Diffstat (limited to 'js/document')
-rwxr-xr-x | js/document/html-document.js | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/js/document/html-document.js b/js/document/html-document.js index aac03606..9e3f0cdd 100755 --- a/js/document/html-document.js +++ b/js/document/html-document.js | |||
@@ -717,9 +717,7 @@ exports.HTMLDocument = Montage.create(TextDocument, { | |||
717 | this.application.ninja.stage.drawUtils.gridHorizontalSpacing = this.gridHorizontalSpacing; | 717 | this.application.ninja.stage.drawUtils.gridHorizontalSpacing = this.gridHorizontalSpacing; |
718 | this.application.ninja.stage.drawUtils.gridVerticalSpacing = this.gridVerticalSpacing; | 718 | this.application.ninja.stage.drawUtils.gridVerticalSpacing = this.gridVerticalSpacing; |
719 | 719 | ||
720 | if((typeof this.selectionModel !== 'undefined') && (this.selectionModel !== null)){ | 720 | |
721 | this.application.ninja.selectedElements = this.selectionModel.slice(0); | ||
722 | } | ||
723 | 721 | ||
724 | if((this.savedLeftScroll!== null) && (this.savedTopScroll !== null)){ | 722 | if((this.savedLeftScroll!== null) && (this.savedTopScroll !== null)){ |
725 | this.application.ninja.stage._iframeContainer.scrollLeft = this.savedLeftScroll; | 723 | this.application.ninja.stage._iframeContainer.scrollLeft = this.savedLeftScroll; |
@@ -727,12 +725,17 @@ exports.HTMLDocument = Montage.create(TextDocument, { | |||
727 | this.application.ninja.stage._iframeContainer.scrollTop = this.savedTopScroll; | 725 | this.application.ninja.stage._iframeContainer.scrollTop = this.savedTopScroll; |
728 | this.application.ninja.stage._scrollLeft = this.savedTopScroll; | 726 | this.application.ninja.stage._scrollLeft = this.savedTopScroll; |
729 | } | 727 | } |
730 | this.application.ninja.stage.handleScroll(); | 728 | |
729 | if((typeof this.selectionModel !== 'undefined') && (this.selectionModel !== null)){ | ||
730 | this.application.ninja.selectedElements = this.selectionModel.slice(0); | ||
731 | } | ||
731 | 732 | ||
732 | this.application.ninja.appModel.show3dGrid = this.draw3DGrid; | 733 | this.application.ninja.appModel.show3dGrid = this.draw3DGrid; |
733 | 734 | ||
734 | this.application.ninja.undocontroller.undoQueue = this.undoStack.slice(0); | 735 | this.application.ninja.undocontroller.undoQueue = this.undoStack.slice(0); |
735 | this.application.ninja.undocontroller.redoQueue = this.redoStack.slice(0); | 736 | this.application.ninja.undocontroller.redoQueue = this.redoStack.slice(0); |
737 | |||
738 | this.application.ninja.currentSelectedContainer = this.documentRoot; | ||
736 | } | 739 | } |
737 | } | 740 | } |
738 | //////////////////////////////////////////////////////////////////// | 741 | //////////////////////////////////////////////////////////////////// |