aboutsummaryrefslogtreecommitdiff
path: root/js/stage
diff options
context:
space:
mode:
authorAnanya Sen2012-02-10 16:03:52 -0800
committerAnanya Sen2012-02-10 16:03:52 -0800
commitc48eeb01bd726895dc577d8b843b2a75883eee07 (patch)
tree5945556f80723285396059aaecb523e27b1cbb0d /js/stage
parentc627ebb5735d55218813b073c655dae6cded6040 (diff)
downloadninja-c48eeb01bd726895dc577d8b843b2a75883eee07.tar.gz
Merge from /joseeight/ninja-internal/tree/FileIO
Signed-off-by: Ananya Sen <Ananya.Sen@motorola.com>
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)