aboutsummaryrefslogtreecommitdiff
path: root/js/stage
diff options
context:
space:
mode:
Diffstat (limited to 'js/stage')
-rwxr-xr-x[-rw-r--r--]js/stage/layout.js0
-rwxr-xr-x[-rw-r--r--]js/stage/stage-deps.js0
-rwxr-xr-xjs/stage/stage-view.reel/stage-view.css36
-rwxr-xr-xjs/stage/stage-view.reel/stage-view.html31
-rwxr-xr-xjs/stage/stage-view.reel/stage-view.js77
-rwxr-xr-x[-rw-r--r--]js/stage/stage.reel/stage.css0
-rwxr-xr-x[-rw-r--r--]js/stage/stage.reel/stage.html14
-rwxr-xr-x[-rw-r--r--]js/stage/stage.reel/stage.js0
-rwxr-xr-x[-rw-r--r--]js/stage/tool-handle.js0
9 files changed, 155 insertions, 3 deletions
diff --git a/js/stage/layout.js b/js/stage/layout.js
index 625c09ad..625c09ad 100644..100755
--- a/js/stage/layout.js
+++ b/js/stage/layout.js
diff --git a/js/stage/stage-deps.js b/js/stage/stage-deps.js
index 7c6d58b4..7c6d58b4 100644..100755
--- a/js/stage/stage-deps.js
+++ b/js/stage/stage-deps.js
diff --git a/js/stage/stage-view.reel/stage-view.css b/js/stage/stage-view.reel/stage-view.css
new file mode 100755
index 00000000..f15f74a0
--- /dev/null
+++ b/js/stage/stage-view.reel/stage-view.css
@@ -0,0 +1,36 @@
1/* <copyright>
2 This file contains proprietary software owned by Motorola Mobility, Inc.<br/>
3 No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/>
4 (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved.
5 </copyright> */
6
7.codeViewContainer {
8 position: absolute;
9 top: 0px;
10 left: 0px;
11 margin: 0px;
12 padding: 0px;
13 background: black;
14 width: 100%;
15 height: 100%;
16 /*display: none;*/
17}
18
19/* OLD CSS for reference
20#mainContent #codeMirror_1 {
21 height:100%;
22}
23*/
24
25.CodeMirror {
26 width: 100%;
27 height: 100%;
28 background: white;
29}
30
31.CodeMirror .CodeMirror-scroll {
32 height: 100%;
33 overflow: scroll;
34 overflow-x: auto;
35 overflow-y: auto;
36}
diff --git a/js/stage/stage-view.reel/stage-view.html b/js/stage/stage-view.reel/stage-view.html
new file mode 100755
index 00000000..ee8fa315
--- /dev/null
+++ b/js/stage/stage-view.reel/stage-view.html
@@ -0,0 +1,31 @@
1<!DOCTYPE html>
2<!-- <copyright>
3 This file contains proprietary software owned by Motorola Mobility, Inc.<br/>
4 No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/>
5 (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved.
6 </copyright> -->
7<html>
8<head>
9 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
10 <link rel="stylesheet" type="text/css" href="stage-view.css">
11
12 <script type="text/montage-serialization">
13 {
14 "owner": {
15 "module": "js/stage/stage-view.reel",
16 "name": "StageView",
17 "properties": {
18 "element": {"#": "codeViewContainer"}
19 }
20 }
21 }
22 </script>
23
24</head>
25<body>
26
27
28 <section id="codeViewContainer" class="codeViewContainer"></section>
29
30</body>
31</html>
diff --git a/js/stage/stage-view.reel/stage-view.js b/js/stage/stage-view.reel/stage-view.js
new file mode 100755
index 00000000..63fe88ba
--- /dev/null
+++ b/js/stage/stage-view.reel/stage-view.js
@@ -0,0 +1,77 @@
1/* <copyright>
2This file contains proprietary software owned by Motorola Mobility, Inc.<br/>
3No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/>
4(c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved.
5</copyright> */
6
7/**
8@requires montage/core/core
9@requires montage/ui/component
10*/
11var Montage = require("montage/core/core").Montage,
12 Component = require("montage/ui/component").Component;
13
14exports.StageView = Montage.create(Component, {
15 _documents: {
16 value : []
17 },
18
19 docs: {
20 get: function() {
21 return this._documents;
22 },
23 set: function(value) {
24 //console.log(value);
25 }
26 },
27
28 templateDidLoad: {
29 value: function() {
30 this.eventManager.addEventListener("appLoaded", this, false);
31 //console.log(this.application.ninja.documentController._documents);
32 }
33 },
34
35 handleAppLoaded: {
36 value: function() {
37
38 // Don't bind for now
39 /*
40 Object.defineBinding(this, "docs", {
41 boundObject: this.application.ninja.documentController,
42 boundObjectPropertyPath: "_documents"
43 });
44 */
45
46 }
47 },
48
49 // Temporary function to create a Codemirror text view
50 createTextView: {
51 value: function(doc) {
52// DocumentManager._hideCurrentDocument();
53
54 this.application.ninja.currentDocument.container.parentNode.style["display"] = "none";
55
56// stageManagerModule.stageManager._scrollFlag = false; // TODO HACK to prevent type error on Hide/Show Iframe
57// DocumentManager.activeDocument = doc;
58
59 this.element.appendChild(doc.textArea);
60
61
62 var codeM = CodeMirror.fromTextArea(doc.textArea, {
63 lineNumbers: true,
64 mode: "javascript"
65// onCursorActivity: function() {
66// DocumentManager._codeEditor.editor.setLineClass(DocumentManager._codeEditor.hline, null);
67// DocumentManager._codeEditor.hline = DocumentManager._codeEditor.editor.setLineClass(DocumentManager._codeEditor.editor.getCursor().line, "activeline");
68// }
69 });
70
71// DocumentManager._codeEditor.hline = DocumentManager._codeEditor.editor.setLineClass(0, "activeline");
72
73 this.application.ninja.stage.hideCanvas(true);
74
75 }
76 }
77}); \ No newline at end of file
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 49d10baf..f28d9800 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",
@@ -41,12 +49,12 @@
41 "properties": { 49 "properties": {
42 "element": {"#": "stageAndScenesContainer"}, 50 "element": {"#": "stageAndScenesContainer"},
43 "_iframeContainer": {"#": "iframeContainer"}, 51 "_iframeContainer": {"#": "iframeContainer"},
44 "codeViewContainer": {"#": "codeViewContainer"},
45 "_layoutCanvas": {"#": "layoutCanvas"}, 52 "_layoutCanvas": {"#": "layoutCanvas"},
46 "_canvas": {"#": "stageCanvas"}, 53 "_canvas": {"#": "stageCanvas"},
47 "_drawingCanvas": {"#": "drawingCanvas"}, 54 "_drawingCanvas": {"#": "drawingCanvas"},
48 "stageDeps": {"@": "StageDeps1"}, 55 "stageDeps": {"@": "StageDeps1"},
49 "layout": {"@": "layout1"} 56 "layout": {"@": "layout1"},
57 "stageView": {"@": "stageView"}
50 }, 58 },
51 "bindings": { 59 "bindings": {
52 "currentDocumentStageView": { 60 "currentDocumentStageView": {
@@ -63,8 +71,8 @@
63<body> 71<body>
64 72
65 <section id="stageAndScenesContainer" class="stageAndScenesContainer"> 73 <section id="stageAndScenesContainer" class="stageAndScenesContainer">
74 <section id="stageView"></section>
66 <section id="iframeContainer"></section> 75 <section id="iframeContainer"></section>
67 <section id="codeViewContainer"></section>
68 <canvas id="layoutCanvas"></canvas> 76 <canvas id="layoutCanvas"></canvas>
69 <canvas id="stageCanvas"></canvas> 77 <canvas id="stageCanvas"></canvas>
70 <canvas id="drawingCanvas"></canvas> 78 <canvas id="drawingCanvas"></canvas>
diff --git a/js/stage/stage.reel/stage.js b/js/stage/stage.reel/stage.js
index 3e0b852e..3e0b852e 100644..100755
--- a/js/stage/stage.reel/stage.js
+++ b/js/stage/stage.reel/stage.js
diff --git a/js/stage/tool-handle.js b/js/stage/tool-handle.js
index 03513de7..03513de7 100644..100755
--- a/js/stage/tool-handle.js
+++ b/js/stage/tool-handle.js