aboutsummaryrefslogtreecommitdiff
path: root/js/stage
diff options
context:
space:
mode:
authorJose Antonio Marquez2012-02-10 15:33:20 -0800
committerJose Antonio Marquez2012-02-10 15:33:20 -0800
commitf7f445e8ced728d04de4bf1c5711f6756488a71e (patch)
treeb09f00c28ff7123354af40509283ddec846f438d /js/stage
parent632a5daca17acb774b9344ccc0e9107f1643924c (diff)
parent48977780443d97b9e97b047066639c9056788041 (diff)
downloadninja-f7f445e8ced728d04de4bf1c5711f6756488a71e.tar.gz
Merge branch 'refs/heads/NinjaInternal' into FileIO
Conflicts: js/ninja.reel/ninja.html js/stage/stage.reel/stage.html
Diffstat (limited to 'js/stage')
-rwxr-xr-xjs/stage/stage.reel/stage.html12
-rwxr-xr-xjs/stage/stage.reel/stage.js7
2 files changed, 18 insertions, 1 deletions
diff --git a/js/stage/stage.reel/stage.html b/js/stage/stage.reel/stage.html
index f28d9800..9ed0f636 100755
--- a/js/stage/stage.reel/stage.html
+++ b/js/stage/stage.reel/stage.html
@@ -42,6 +42,14 @@
42 } 42 }
43 } 43 }
44 }, 44 },
45
46 "textTool": {
47 "module": "node_modules/labs/rich-text-editor.reel",
48 "name": "RichTextEditor",
49 "properties": {
50 "element" : {"#": "textToolObject"}
51 }
52 },
45 53
46 "owner": { 54 "owner": {
47 "module": "js/stage/stage.reel", 55 "module": "js/stage/stage.reel",
@@ -54,7 +62,8 @@
54 "_drawingCanvas": {"#": "drawingCanvas"}, 62 "_drawingCanvas": {"#": "drawingCanvas"},
55 "stageDeps": {"@": "StageDeps1"}, 63 "stageDeps": {"@": "StageDeps1"},
56 "layout": {"@": "layout1"}, 64 "layout": {"@": "layout1"},
57 "stageView": {"@": "stageView"} 65 "stageView": {"@": "stageView"},
66 "textTool": {"@": "textTool"}
58 }, 67 },
59 "bindings": { 68 "bindings": {
60 "currentDocumentStageView": { 69 "currentDocumentStageView": {
@@ -73,6 +82,7 @@
73 <section id="stageAndScenesContainer" class="stageAndScenesContainer"> 82 <section id="stageAndScenesContainer" class="stageAndScenesContainer">
74 <section id="stageView"></section> 83 <section id="stageView"></section>
75 <section id="iframeContainer"></section> 84 <section id="iframeContainer"></section>
85 <section id="textToolObject">asdasd asd asd asd asd asd </section>
76 <canvas id="layoutCanvas"></canvas> 86 <canvas id="layoutCanvas"></canvas>
77 <canvas id="stageCanvas"></canvas> 87 <canvas id="stageCanvas"></canvas>
78 <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 8c0f0fa0..852f480d 100755
--- a/js/stage/stage.reel/stage.js
+++ b/js/stage/stage.reel/stage.js
@@ -12,6 +12,7 @@ var vecUtils = require("js/helper-classes/3D/vec-utils").VecUtils;
12 12
13exports.Stage = Montage.create(Component, { 13exports.Stage = Montage.create(Component, {
14 14
15 textTool: { value: null },
15 // TODO - Need to figure out how to remove this dependency 16 // TODO - Need to figure out how to remove this dependency
16 // Needed by some tools that depend on selectionDrawn event to set up some logic 17 // Needed by some tools that depend on selectionDrawn event to set up some logic
17 drawNow: { value : false }, 18 drawNow: { value : false },
@@ -779,6 +780,12 @@ exports.Stage = Montage.create(Component, {
779 } 780 }
780 }, 781 },
781 782
783 toViewportCoordinates: {
784 value: function(x,y) {
785 return [x + this._userContentLeft, y + this._userContentTop];
786 }
787 },
788
782 setZoom: { 789 setZoom: {
783 value: function(value) { 790 value: function(value) {
784 if(!this._firstDraw) 791 if(!this._firstDraw)