diff options
author | John Mayhew | 2012-02-10 16:04:19 -0800 |
---|---|---|
committer | John Mayhew | 2012-02-10 16:04:19 -0800 |
commit | 730c1e191e36b8ab8dba576c481a6585e0dfa69e (patch) | |
tree | c86445ff8d1981e97096ec5e9f6cc5301dc9ea40 /js/stage | |
parent | cde1dd9a9156b9682fdf85ce2cd4acdd94124c37 (diff) | |
parent | 48977780443d97b9e97b047066639c9056788041 (diff) | |
download | ninja-730c1e191e36b8ab8dba576c481a6585e0dfa69e.tar.gz |
Merge branch 'master' of github.com:Motorola-Mobility/ninja-internal into WorkingBranch
Conflicts:
js/ninja.reel/ninja.html
Diffstat (limited to 'js/stage')
-rw-r--r-- | js/stage/stage.reel/stage.html | 12 | ||||
-rw-r--r-- | js/stage/stage.reel/stage.js | 7 |
2 files changed, 18 insertions, 1 deletions
diff --git a/js/stage/stage.reel/stage.html b/js/stage/stage.reel/stage.html index 49d10baf..623c54b8 100644 --- a/js/stage/stage.reel/stage.html +++ b/js/stage/stage.reel/stage.html | |||
@@ -34,6 +34,14 @@ | |||
34 | } | 34 | } |
35 | } | 35 | } |
36 | }, | 36 | }, |
37 | |||
38 | "textTool": { | ||
39 | "module": "node_modules/labs/rich-text-editor.reel", | ||
40 | "name": "RichTextEditor", | ||
41 | "properties": { | ||
42 | "element" : {"#": "textToolObject"} | ||
43 | } | ||
44 | }, | ||
37 | 45 | ||
38 | "owner": { | 46 | "owner": { |
39 | "module": "js/stage/stage.reel", | 47 | "module": "js/stage/stage.reel", |
@@ -46,7 +54,8 @@ | |||
46 | "_canvas": {"#": "stageCanvas"}, | 54 | "_canvas": {"#": "stageCanvas"}, |
47 | "_drawingCanvas": {"#": "drawingCanvas"}, | 55 | "_drawingCanvas": {"#": "drawingCanvas"}, |
48 | "stageDeps": {"@": "StageDeps1"}, | 56 | "stageDeps": {"@": "StageDeps1"}, |
49 | "layout": {"@": "layout1"} | 57 | "layout": {"@": "layout1"}, |
58 | "textTool": {"@": "textTool"} | ||
50 | }, | 59 | }, |
51 | "bindings": { | 60 | "bindings": { |
52 | "currentDocumentStageView": { | 61 | "currentDocumentStageView": { |
@@ -64,6 +73,7 @@ | |||
64 | 73 | ||
65 | <section id="stageAndScenesContainer" class="stageAndScenesContainer"> | 74 | <section id="stageAndScenesContainer" class="stageAndScenesContainer"> |
66 | <section id="iframeContainer"></section> | 75 | <section id="iframeContainer"></section> |
76 | <section id="textToolObject">asdasd asd asd asd asd asd </section> | ||
67 | <section id="codeViewContainer"></section> | 77 | <section id="codeViewContainer"></section> |
68 | <canvas id="layoutCanvas"></canvas> | 78 | <canvas id="layoutCanvas"></canvas> |
69 | <canvas id="stageCanvas"></canvas> | 79 | <canvas id="stageCanvas"></canvas> |
diff --git a/js/stage/stage.reel/stage.js b/js/stage/stage.reel/stage.js index 9e2df5a2..6d9a7355 100644 --- 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 | ||
13 | exports.Stage = Montage.create(Component, { | 13 | exports.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 }, |
@@ -780,6 +781,12 @@ exports.Stage = Montage.create(Component, { | |||
780 | } | 781 | } |
781 | }, | 782 | }, |
782 | 783 | ||
784 | toViewportCoordinates: { | ||
785 | value: function(x,y) { | ||
786 | return [x + this._userContentLeft, y + this._userContentTop]; | ||
787 | } | ||
788 | }, | ||
789 | |||
783 | setZoom: { | 790 | setZoom: { |
784 | value: function(value) { | 791 | value: function(value) { |
785 | if(!this._firstDraw) | 792 | if(!this._firstDraw) |