diff options
author | Kruti Shah | 2012-06-27 09:25:42 -0700 |
---|---|---|
committer | Kruti Shah | 2012-06-27 09:25:42 -0700 |
commit | d6bffa2450f68bdf9bfff0f4e155778f59f3624a (patch) | |
tree | c37300f67a3fb502d7f4e277600944739d48fd82 /js/stage/stage.reel | |
parent | b52747edbeba7d210fca98acccb2d2df52134bca (diff) | |
parent | 46174eb0ce93d660c8d2e9276fbdc4f9a03f056a (diff) | |
download | ninja-d6bffa2450f68bdf9bfff0f4e155778f59f3624a.tar.gz |
Merge branch 'refs/heads/ninjainternalmaster' into Timeline-local-kruti
Diffstat (limited to 'js/stage/stage.reel')
-rwxr-xr-x | js/stage/stage.reel/stage.css | 13 | ||||
-rwxr-xr-x | js/stage/stage.reel/stage.html | 12 | ||||
-rwxr-xr-x | js/stage/stage.reel/stage.js | 12 |
3 files changed, 29 insertions, 8 deletions
diff --git a/js/stage/stage.reel/stage.css b/js/stage/stage.reel/stage.css index 13537ba1..2c2e30d3 100755 --- a/js/stage/stage.reel/stage.css +++ b/js/stage/stage.reel/stage.css | |||
@@ -12,6 +12,16 @@ | |||
12 | overflow: hidden; | 12 | overflow: hidden; |
13 | } | 13 | } |
14 | 14 | ||
15 | .montage-editor-container { | ||
16 | z-index: 8; | ||
17 | display: none; | ||
18 | position: absolute; | ||
19 | } | ||
20 | |||
21 | .stageAndScenesContainer .montage-editor { | ||
22 | -webkit-user-select:text; | ||
23 | } | ||
24 | |||
15 | .codeViewContainer { | 25 | .codeViewContainer { |
16 | position: absolute; | 26 | position: absolute; |
17 | top: 0px; | 27 | top: 0px; |
@@ -55,4 +65,5 @@ div.CodeMirror span.CodeMirror-matchingbracket {color: #000 !important;backgroun | |||
55 | .cm-s-monokai .activeline {background: #8da6ce; !important} | 65 | .cm-s-monokai .activeline {background: #8da6ce; !important} |
56 | .cm-s-rubyblue .activeline {background: #3E7087; !important} | 66 | .cm-s-rubyblue .activeline {background: #3E7087; !important} |
57 | .cm-s-lesser-dark .activeline {background: #8da6ce; !important} | 67 | .cm-s-lesser-dark .activeline {background: #8da6ce; !important} |
58 | .cm-s-xq-dark .activeline {background: #8da6ce; !important} \ No newline at end of file | 68 | .cm-s-xq-dark .activeline {background: #8da6ce; !important} |
69 | |||
diff --git a/js/stage/stage.reel/stage.html b/js/stage/stage.reel/stage.html index 2ed596f3..215f8f2e 100755 --- a/js/stage/stage.reel/stage.html +++ b/js/stage/stage.reel/stage.html | |||
@@ -40,7 +40,13 @@ | |||
40 | "focusManager": { | 40 | "focusManager": { |
41 | "object": "js/components/focus-manager.reel" | 41 | "object": "js/components/focus-manager.reel" |
42 | }, | 42 | }, |
43 | 43 | ||
44 | "bindingView": { | ||
45 | "prototype": "js/stage/binding-view.reel", | ||
46 | "properties" : { | ||
47 | "element": {"#": "bindingView" } | ||
48 | } | ||
49 | }, | ||
44 | "owner": { | 50 | "owner": { |
45 | "prototype": "js/stage/stage.reel", | 51 | "prototype": "js/stage/stage.reel", |
46 | "properties": { | 52 | "properties": { |
@@ -53,7 +59,8 @@ | |||
53 | "stageDeps": {"@": "stageDeps"}, | 59 | "stageDeps": {"@": "stageDeps"}, |
54 | "layout": {"@": "layout"}, | 60 | "layout": {"@": "layout"}, |
55 | "textTool": {"@": "textTool"}, | 61 | "textTool": {"@": "textTool"}, |
56 | "focusManager": {"@": "focusManager"} | 62 | "focusManager": {"@": "focusManager"}, |
63 | "bindingView": {"@": "bindingView"} | ||
57 | }, | 64 | }, |
58 | "bindings": { | 65 | "bindings": { |
59 | "currentDocumentStageView": { | 66 | "currentDocumentStageView": { |
@@ -77,6 +84,7 @@ | |||
77 | <canvas data-montage-id="layoutCanvas" class="layoutCanvas"></canvas> | 84 | <canvas data-montage-id="layoutCanvas" class="layoutCanvas"></canvas> |
78 | <canvas data-montage-id="stageCanvas" class="stageCanvas"></canvas> | 85 | <canvas data-montage-id="stageCanvas" class="stageCanvas"></canvas> |
79 | <canvas data-montage-id="drawingCanvas" class="drawingCanvas"></canvas> | 86 | <canvas data-montage-id="drawingCanvas" class="drawingCanvas"></canvas> |
87 | <section data-montage-id="bindingView"></section> | ||
80 | </section> | 88 | </section> |
81 | 89 | ||
82 | </body> | 90 | </body> |
diff --git a/js/stage/stage.reel/stage.js b/js/stage/stage.reel/stage.js index 14bc00eb..8cbe3210 100755 --- a/js/stage/stage.reel/stage.js +++ b/js/stage/stage.reel/stage.js | |||
@@ -27,6 +27,9 @@ exports.Stage = Montage.create(Component, { | |||
27 | _canvasSelectionPrefs: { value: { "thickness" : 1.0, "color" : "#46a1ff" } }, | 27 | _canvasSelectionPrefs: { value: { "thickness" : 1.0, "color" : "#46a1ff" } }, |
28 | _canvasDrawingPrefs: { value: { "thickness" : 1.0, "color" : "#000" } }, | 28 | _canvasDrawingPrefs: { value: { "thickness" : 1.0, "color" : "#000" } }, |
29 | drawingContextPreferences: { get: function() { return this._canvasDrawingPrefs; } }, | 29 | drawingContextPreferences: { get: function() { return this._canvasDrawingPrefs; } }, |
30 | bindingView: { | ||
31 | value: null | ||
32 | }, | ||
30 | 33 | ||
31 | _iframeContainer: { | 34 | _iframeContainer: { |
32 | value: null, | 35 | value: null, |
@@ -320,9 +323,8 @@ exports.Stage = Montage.create(Component, { | |||
320 | value: function() { | 323 | value: function() { |
321 | if(this.resizeCanvases) { | 324 | if(this.resizeCanvases) { |
322 | // TODO GET THE SCROLL SIZE FROM THE CSS -- 11 px | 325 | // TODO GET THE SCROLL SIZE FROM THE CSS -- 11 px |
323 | this._canvas.width = this._layoutCanvas.width = this._drawingCanvas.width = this._gridCanvas.width = this.element.offsetWidth - 11 ; | 326 | this._canvas.width = this._layoutCanvas.width = this._drawingCanvas.width = this._gridCanvas.width = this.bindingView.width = this.element.offsetWidth - 11; |
324 | this._canvas.height = this._layoutCanvas.height = this._drawingCanvas.height = this._gridCanvas.height = this.element.offsetHeight - 11;// - 26 - 26; | 327 | this._canvas.height = this._layoutCanvas.height = this._drawingCanvas.height = this._gridCanvas.height = this.bindingView.height = this.element.offsetHeight - 11;// - 26 - 26; |
325 | |||
326 | // Hack for now until a full component | 328 | // Hack for now until a full component |
327 | this.layout.draw(); | 329 | this.layout.draw(); |
328 | if(this.currentDocument && (this.currentDocument.currentView === "design")) { | 330 | if(this.currentDocument && (this.currentDocument.currentView === "design")) { |
@@ -407,8 +409,8 @@ exports.Stage = Montage.create(Component, { | |||
407 | } | 409 | } |
408 | 410 | ||
409 | // Recalculate the canvas sizes because of splitter resizing | 411 | // Recalculate the canvas sizes because of splitter resizing |
410 | this._canvas.width = this._layoutCanvas.width = this._drawingCanvas.width = this._gridCanvas.width = this.element.offsetWidth - 11 ; | 412 | this._canvas.width = this._layoutCanvas.width = this._drawingCanvas.width = this._gridCanvas.width = this.bindingView.width = this.element.offsetWidth - 11 ; |
411 | this._canvas.height = this._layoutCanvas.height = this._drawingCanvas.height = this._gridCanvas.height = this.element.offsetHeight - 11; | 413 | this._canvas.height = this._layoutCanvas.height = this._drawingCanvas.height = this._gridCanvas.height = this.bindingView.height = this.element.offsetHeight - 11; |
412 | 414 | ||
413 | designView.iframe.contentWindow.addEventListener("scroll", this, false); | 415 | designView.iframe.contentWindow.addEventListener("scroll", this, false); |
414 | 416 | ||