diff options
author | Eric Guzman | 2012-03-16 15:09:09 -0700 |
---|---|---|
committer | Eric Guzman | 2012-03-16 15:09:09 -0700 |
commit | f08e3660384ed6ed2ba8ecf959c90fd1ade818eb (patch) | |
tree | 49c36caa1f0cf7e5ff8ca9239609965aa1b7a8e5 /js/stage | |
parent | 4afb01e3b8261ab5e9492bfc63ad17e44dfcb934 (diff) | |
parent | 3e98d9eaf6f691aa0f7a4334983537a4ee3ffd39 (diff) | |
download | ninja-f08e3660384ed6ed2ba8ecf959c90fd1ade818eb.tar.gz |
Merge branch 'refs/heads/master' into CSSPanelUpdates
Diffstat (limited to 'js/stage')
-rwxr-xr-x | js/stage/stage.reel/stage.html | 7 | ||||
-rwxr-xr-x | js/stage/stage.reel/stage.js | 11 |
2 files changed, 15 insertions, 3 deletions
diff --git a/js/stage/stage.reel/stage.html b/js/stage/stage.reel/stage.html index 812e3d55..f796303c 100755 --- a/js/stage/stage.reel/stage.html +++ b/js/stage/stage.reel/stage.html | |||
@@ -50,6 +50,10 @@ | |||
50 | "element" : {"#": "textToolObject"} | 50 | "element" : {"#": "textToolObject"} |
51 | } | 51 | } |
52 | }, | 52 | }, |
53 | |||
54 | "focusManager": { | ||
55 | "object": "js/components/focus-manager.reel" | ||
56 | }, | ||
53 | 57 | ||
54 | "owner": { | 58 | "owner": { |
55 | "module": "js/stage/stage.reel", | 59 | "module": "js/stage/stage.reel", |
@@ -63,7 +67,8 @@ | |||
63 | "stageDeps": {"@": "StageDeps1"}, | 67 | "stageDeps": {"@": "StageDeps1"}, |
64 | "layout": {"@": "layout1"}, | 68 | "layout": {"@": "layout1"}, |
65 | "stageView": {"@": "stageView"}, | 69 | "stageView": {"@": "stageView"}, |
66 | "textTool": {"@": "textTool"} | 70 | "textTool": {"@": "textTool"}, |
71 | "focusManager": {"@": "focusManager"} | ||
67 | }, | 72 | }, |
68 | "bindings": { | 73 | "bindings": { |
69 | "currentDocumentStageView": { | 74 | "currentDocumentStageView": { |
diff --git a/js/stage/stage.reel/stage.js b/js/stage/stage.reel/stage.js index 4c1d046b..e139af97 100755 --- a/js/stage/stage.reel/stage.js +++ b/js/stage/stage.reel/stage.js | |||
@@ -170,8 +170,7 @@ exports.Stage = Montage.create(Component, { | |||
170 | 170 | ||
171 | // Hack for now until a full component | 171 | // Hack for now until a full component |
172 | this.layout.draw(); | 172 | this.layout.draw(); |
173 | } | 173 | } else if(this.updatedStage) { |
174 | else if(this.updatedStage) { | ||
175 | this.layout.draw(); | 174 | this.layout.draw(); |
176 | this.layout.draw3DInfo(true); | 175 | this.layout.draw3DInfo(true); |
177 | } | 176 | } |
@@ -235,6 +234,10 @@ exports.Stage = Montage.create(Component, { | |||
235 | 234 | ||
236 | this.hideCanvas(false); | 235 | this.hideCanvas(false); |
237 | 236 | ||
237 | // Recalculate the canvas sizes because of splitter resizing | ||
238 | this._canvas.width = this._layoutCanvas.width = this._drawingCanvas.width = this.element.offsetWidth - 11 ; | ||
239 | this._canvas.height = this._layoutCanvas.height = this._drawingCanvas.height = this.element.offsetHeight - 11; | ||
240 | |||
238 | this._documentRoot = this.application.ninja.currentDocument.documentRoot; | 241 | this._documentRoot = this.application.ninja.currentDocument.documentRoot; |
239 | this._viewport = this.application.ninja.currentDocument.documentRoot.parentNode; | 242 | this._viewport = this.application.ninja.currentDocument.documentRoot.parentNode; |
240 | 243 | ||
@@ -319,6 +322,10 @@ exports.Stage = Montage.create(Component, { | |||
319 | 322 | ||
320 | handleMousedown: { | 323 | handleMousedown: { |
321 | value: function(event) { | 324 | value: function(event) { |
325 | // Call the focus manager to set focus to blur any focus'd elements | ||
326 | this.focusManager.setFocus(); | ||
327 | |||
328 | |||
322 | var point; | 329 | var point; |
323 | // event.preventDefault(); // commenting because HTML elements in the IDE are retaining focus | 330 | // event.preventDefault(); // commenting because HTML elements in the IDE are retaining focus |
324 | // If right click set the context menu to true to prevent a mouse up. | 331 | // If right click set the context menu to true to prevent a mouse up. |