diff options
Diffstat (limited to 'js/stage/stage.reel')
-rwxr-xr-x[-rw-r--r--] | js/stage/stage.reel/stage.css | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | js/stage/stage.reel/stage.html | 12 | ||||
-rwxr-xr-x[-rw-r--r--] | js/stage/stage.reel/stage.js | 22 |
3 files changed, 28 insertions, 6 deletions
diff --git a/js/stage/stage.reel/stage.css b/js/stage/stage.reel/stage.css index 54b9761b..54b9761b 100644..100755 --- a/js/stage/stage.reel/stage.css +++ b/js/stage/stage.reel/stage.css | |||
diff --git a/js/stage/stage.reel/stage.html b/js/stage/stage.reel/stage.html index 623c54b8..9ed0f636 100644..100755 --- a/js/stage/stage.reel/stage.html +++ b/js/stage/stage.reel/stage.html | |||
@@ -11,6 +11,14 @@ | |||
11 | 11 | ||
12 | <script type="text/montage-serialization"> | 12 | <script type="text/montage-serialization"> |
13 | { | 13 | { |
14 | "stageView" : { | ||
15 | "module": "js/stage/stage-view.reel", | ||
16 | "name": "StageView", | ||
17 | "properties": { | ||
18 | "element": {"#": "stageView"} | ||
19 | } | ||
20 | }, | ||
21 | |||
14 | "StageDeps1": { | 22 | "StageDeps1": { |
15 | "module": "js/stage/stage-deps", | 23 | "module": "js/stage/stage-deps", |
16 | "name": "StageDeps", | 24 | "name": "StageDeps", |
@@ -49,12 +57,12 @@ | |||
49 | "properties": { | 57 | "properties": { |
50 | "element": {"#": "stageAndScenesContainer"}, | 58 | "element": {"#": "stageAndScenesContainer"}, |
51 | "_iframeContainer": {"#": "iframeContainer"}, | 59 | "_iframeContainer": {"#": "iframeContainer"}, |
52 | "codeViewContainer": {"#": "codeViewContainer"}, | ||
53 | "_layoutCanvas": {"#": "layoutCanvas"}, | 60 | "_layoutCanvas": {"#": "layoutCanvas"}, |
54 | "_canvas": {"#": "stageCanvas"}, | 61 | "_canvas": {"#": "stageCanvas"}, |
55 | "_drawingCanvas": {"#": "drawingCanvas"}, | 62 | "_drawingCanvas": {"#": "drawingCanvas"}, |
56 | "stageDeps": {"@": "StageDeps1"}, | 63 | "stageDeps": {"@": "StageDeps1"}, |
57 | "layout": {"@": "layout1"}, | 64 | "layout": {"@": "layout1"}, |
65 | "stageView": {"@": "stageView"}, | ||
58 | "textTool": {"@": "textTool"} | 66 | "textTool": {"@": "textTool"} |
59 | }, | 67 | }, |
60 | "bindings": { | 68 | "bindings": { |
@@ -72,9 +80,9 @@ | |||
72 | <body> | 80 | <body> |
73 | 81 | ||
74 | <section id="stageAndScenesContainer" class="stageAndScenesContainer"> | 82 | <section id="stageAndScenesContainer" class="stageAndScenesContainer"> |
83 | <section id="stageView"></section> | ||
75 | <section id="iframeContainer"></section> | 84 | <section id="iframeContainer"></section> |
76 | <section id="textToolObject">asdasd asd asd asd asd asd </section> | 85 | <section id="textToolObject">asdasd asd asd asd asd asd </section> |
77 | <section id="codeViewContainer"></section> | ||
78 | <canvas id="layoutCanvas"></canvas> | 86 | <canvas id="layoutCanvas"></canvas> |
79 | <canvas id="stageCanvas"></canvas> | 87 | <canvas id="stageCanvas"></canvas> |
80 | <canvas id="drawingCanvas"></canvas> | 88 | <canvas id="drawingCanvas"></canvas> |
diff --git a/js/stage/stage.reel/stage.js b/js/stage/stage.reel/stage.js index 6d9a7355..852f480d 100644..100755 --- a/js/stage/stage.reel/stage.js +++ b/js/stage/stage.reel/stage.js | |||
@@ -117,9 +117,6 @@ exports.Stage = Montage.create(Component, { | |||
117 | _userContentLeft: { value: 0 }, | 117 | _userContentLeft: { value: 0 }, |
118 | _userContentTop: { value: 0 }, | 118 | _userContentTop: { value: 0 }, |
119 | _userContentBorder: { value: 0 }, | 119 | _userContentBorder: { value: 0 }, |
120 | savedLeftScroll: { value: null }, | ||
121 | savedTopScroll: { value: null }, | ||
122 | |||
123 | 120 | ||
124 | documentRoot: { | 121 | documentRoot: { |
125 | get: function () { return this._documentRoot; }, | 122 | get: function () { return this._documentRoot; }, |
@@ -248,6 +245,8 @@ exports.Stage = Montage.create(Component, { | |||
248 | 245 | ||
249 | this._scrollLeft = this._iframeContainer.scrollLeft; | 246 | this._scrollLeft = this._iframeContainer.scrollLeft; |
250 | this._scrollTop = this._iframeContainer.scrollTop; | 247 | this._scrollTop = this._iframeContainer.scrollTop; |
248 | this.application.ninja.currentDocument.savedLeftScroll = this._iframeContainer.scrollLeft; | ||
249 | this.application.ninja.currentDocument.savedTopScroll = this._iframeContainer.scrollTop; | ||
251 | 250 | ||
252 | this.userContentBorder = parseInt(this._documentRoot.elementModel.controller.getProperty(this._documentRoot, "border")); | 251 | this.userContentBorder = parseInt(this._documentRoot.elementModel.controller.getProperty(this._documentRoot, "border")); |
253 | 252 | ||
@@ -883,5 +882,20 @@ exports.Stage = Montage.create(Component, { | |||
883 | 882 | ||
884 | this.stageDeps.snapManager.updateWorkingPlaneFromView(); | 883 | this.stageDeps.snapManager.updateWorkingPlaneFromView(); |
885 | } | 884 | } |
886 | } | 885 | }, |
886 | |||
887 | saveScroll:{ | ||
888 | value: function(){ | ||
889 | this.application.ninja.documentController.activeDocument.savedLeftScroll = this._iframeContainer.scrollLeft; | ||
890 | this.application.ninja.documentController.activeDocument.savedTopScroll = this._iframeContainer.scrollTop; | ||
891 | } | ||
892 | }, | ||
893 | restoreScroll:{ | ||
894 | value: function(){ | ||
895 | this._iframeContainer.scrollLeft = this.application.ninja.documentController.activeDocument.savedLeftScroll; | ||
896 | this._scrollLeft = this.application.ninja.documentController.activeDocument.savedLeftScroll; | ||
897 | this._iframeContainer.scrollTop = this.application.ninja.documentController.activeDocument.savedTopScroll; | ||
898 | this._scrollTop = this.application.ninja.documentController.activeDocument.savedTopScroll; | ||
899 | } | ||
900 | } | ||
887 | }); \ No newline at end of file | 901 | }); \ No newline at end of file |