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 | 32 |
3 files changed, 32 insertions, 12 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..59eb9317 100644..100755 --- a/js/stage/stage.reel/stage.js +++ b/js/stage/stage.reel/stage.js | |||
@@ -4,15 +4,13 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot | |||
4 | (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. | 4 | (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. |
5 | </copyright> */ | 5 | </copyright> */ |
6 | 6 | ||
7 | var Montage = require("montage/core/core").Montage, | 7 | var Montage = require("montage/core/core").Montage, |
8 | Component = require("montage/ui/component").Component; | 8 | Component = require("montage/ui/component").Component, |
9 | 9 | drawUtils = require("js/helper-classes/3D/draw-utils").DrawUtils, | |
10 | var drawUtils = require("js/helper-classes/3D/draw-utils").DrawUtils; | 10 | vecUtils = require("js/helper-classes/3D/vec-utils").VecUtils; |
11 | var vecUtils = require("js/helper-classes/3D/vec-utils").VecUtils; | ||
12 | 11 | ||
13 | exports.Stage = Montage.create(Component, { | 12 | exports.Stage = Montage.create(Component, { |
14 | 13 | ||
15 | textTool: { value: null }, | ||
16 | // TODO - Need to figure out how to remove this dependency | 14 | // TODO - Need to figure out how to remove this dependency |
17 | // Needed by some tools that depend on selectionDrawn event to set up some logic | 15 | // Needed by some tools that depend on selectionDrawn event to set up some logic |
18 | drawNow: { value : false }, | 16 | drawNow: { value : false }, |
@@ -117,9 +115,6 @@ exports.Stage = Montage.create(Component, { | |||
117 | _userContentLeft: { value: 0 }, | 115 | _userContentLeft: { value: 0 }, |
118 | _userContentTop: { value: 0 }, | 116 | _userContentTop: { value: 0 }, |
119 | _userContentBorder: { value: 0 }, | 117 | _userContentBorder: { value: 0 }, |
120 | savedLeftScroll: { value: null }, | ||
121 | savedTopScroll: { value: null }, | ||
122 | |||
123 | 118 | ||
124 | documentRoot: { | 119 | documentRoot: { |
125 | get: function () { return this._documentRoot; }, | 120 | get: function () { return this._documentRoot; }, |
@@ -248,6 +243,8 @@ exports.Stage = Montage.create(Component, { | |||
248 | 243 | ||
249 | this._scrollLeft = this._iframeContainer.scrollLeft; | 244 | this._scrollLeft = this._iframeContainer.scrollLeft; |
250 | this._scrollTop = this._iframeContainer.scrollTop; | 245 | this._scrollTop = this._iframeContainer.scrollTop; |
246 | this.application.ninja.currentDocument.savedLeftScroll = this._iframeContainer.scrollLeft; | ||
247 | this.application.ninja.currentDocument.savedTopScroll = this._iframeContainer.scrollTop; | ||
251 | 248 | ||
252 | this.userContentBorder = parseInt(this._documentRoot.elementModel.controller.getProperty(this._documentRoot, "border")); | 249 | this.userContentBorder = parseInt(this._documentRoot.elementModel.controller.getProperty(this._documentRoot, "border")); |
253 | 250 | ||
@@ -883,5 +880,20 @@ exports.Stage = Montage.create(Component, { | |||
883 | 880 | ||
884 | this.stageDeps.snapManager.updateWorkingPlaneFromView(); | 881 | this.stageDeps.snapManager.updateWorkingPlaneFromView(); |
885 | } | 882 | } |
886 | } | 883 | }, |
884 | |||
885 | saveScroll:{ | ||
886 | value: function(){ | ||
887 | this.application.ninja.documentController.activeDocument.savedLeftScroll = this._iframeContainer.scrollLeft; | ||
888 | this.application.ninja.documentController.activeDocument.savedTopScroll = this._iframeContainer.scrollTop; | ||
889 | } | ||
890 | }, | ||
891 | restoreScroll:{ | ||
892 | value: function(){ | ||
893 | this._iframeContainer.scrollLeft = this.application.ninja.documentController.activeDocument.savedLeftScroll; | ||
894 | this._scrollLeft = this.application.ninja.documentController.activeDocument.savedLeftScroll; | ||
895 | this._iframeContainer.scrollTop = this.application.ninja.documentController.activeDocument.savedTopScroll; | ||
896 | this._scrollTop = this.application.ninja.documentController.activeDocument.savedTopScroll; | ||
897 | } | ||
898 | } | ||
887 | }); \ No newline at end of file | 899 | }); \ No newline at end of file |