aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
Diffstat (limited to 'js')
-rwxr-xr-xjs/components/layout/bread-crumb.reel/bread-crumb.js4
-rwxr-xr-xjs/controllers/document-controller.js32
-rwxr-xr-xjs/controllers/elements/canvas-controller.js14
-rwxr-xr-xjs/controllers/elements/element-controller.js112
-rwxr-xr-xjs/controllers/elements/shapes-controller.js59
-rwxr-xr-xjs/controllers/elements/stage-controller.js58
-rwxr-xr-xjs/data/menu-data.js61
-rw-r--r--js/data/panels-data.js12
-rwxr-xr-xjs/data/tools-data.js6
-rwxr-xr-xjs/document/html-document.js222
-rwxr-xr-xjs/document/templates/montage-web/default_html.css30
-rwxr-xr-xjs/document/templates/montage-web/index.html41
-rw-r--r--js/document/templates/montage-web/main.reel/main.js48
-rwxr-xr-xjs/document/templates/montage-web/package.json8
-rwxr-xr-xjs/helper-classes/3D/draw-utils.js29
-rwxr-xr-xjs/lib/geom/brush-stroke.js3
-rwxr-xr-xjs/lib/geom/geom-obj.js3
-rwxr-xr-xjs/lib/geom/line.js2
-rwxr-xr-xjs/mediators/drag-drop-mediator.js4
-rwxr-xr-xjs/mediators/element-mediator.js225
-rwxr-xr-xjs/mediators/keyboard-mediator.js18
-rwxr-xr-xjs/models/element-model.js36
-rwxr-xr-xjs/panels/Panel.reel/Panel.js5
-rwxr-xr-xjs/panels/PanelContainer.reel/PanelContainer.html11
-rwxr-xr-xjs/panels/PanelContainer.reel/PanelContainer.js1
-rwxr-xr-xjs/panels/components-panel.reel/components-panel.js6
-rw-r--r--js/panels/history-panel/history-item.reel/history-item.css0
-rw-r--r--js/panels/history-panel/history-item.reel/history-item.html29
-rw-r--r--js/panels/history-panel/history-item.reel/history-item.js32
-rw-r--r--js/panels/history-panel/history.reel/history.css34
-rw-r--r--js/panels/history-panel/history.reel/history.html106
-rw-r--r--js/panels/history-panel/history.reel/history.js26
-rwxr-xr-xjs/panels/properties.reel/properties.js6
-rwxr-xr-xjs/stage/stage.reel/stage.js2
-rwxr-xr-xjs/tools/Rotate3DToolBase.js196
-rwxr-xr-xjs/tools/RotateObject3DTool.js1
-rwxr-xr-xjs/tools/RotateStage3DTool.js17
-rwxr-xr-xjs/tools/SelectionTool.js367
-rwxr-xr-xjs/tools/Translate3DToolBase.js158
-rwxr-xr-xjs/tools/TranslateObject3DTool.js17
-rwxr-xr-xjs/tools/modifier-tool-base.js38
41 files changed, 1216 insertions, 863 deletions
diff --git a/js/components/layout/bread-crumb.reel/bread-crumb.js b/js/components/layout/bread-crumb.reel/bread-crumb.js
index f35972b6..45a4d217 100755
--- a/js/components/layout/bread-crumb.reel/bread-crumb.js
+++ b/js/components/layout/bread-crumb.reel/bread-crumb.js
@@ -58,7 +58,7 @@ exports.Breadcrumb = Montage.create(Component, {
58 createContainerElements: { 58 createContainerElements: {
59 value: function() { 59 value: function() {
60 var parentNode; 60 var parentNode;
61 61/*
62 this.containerElements.length = 0; 62 this.containerElements.length = 0;
63 63
64 parentNode = this.container; 64 parentNode = this.container;
@@ -70,7 +70,7 @@ exports.Breadcrumb = Montage.create(Component, {
70 70
71 // This is always the top container which is now hardcoded to body 71 // This is always the top container which is now hardcoded to body
72 this.containerElements.unshift({"node": parentNode, "nodeUuid":parentNode.uuid, "label": "Body"}); 72 this.containerElements.unshift({"node": parentNode, "nodeUuid":parentNode.uuid, "label": "Body"});
73 73*/
74 74
75 75
76 } 76 }
diff --git a/js/controllers/document-controller.js b/js/controllers/document-controller.js
index ddaeb061..1fcdf6d0 100755
--- a/js/controllers/document-controller.js
+++ b/js/controllers/document-controller.js
@@ -10,8 +10,7 @@ var Montage = require("montage/core/core").Montage,
10 Component = require("montage/ui/component").Component, 10 Component = require("montage/ui/component").Component,
11 Uuid = require("montage/core/uuid").Uuid, 11 Uuid = require("montage/core/uuid").Uuid,
12 HTMLDocument = require("js/document/html-document").HTMLDocument, 12 HTMLDocument = require("js/document/html-document").HTMLDocument,
13 TextDocument = require("js/document/text-document").TextDocument, 13 TextDocument = require("js/document/text-document").TextDocument;
14 DocumentController;
15//////////////////////////////////////////////////////////////////////// 14////////////////////////////////////////////////////////////////////////
16// 15//
17var DocumentController = exports.DocumentController = Montage.create(Component, { 16var DocumentController = exports.DocumentController = Montage.create(Component, {
@@ -19,6 +18,10 @@ var DocumentController = exports.DocumentController = Montage.create(Component,
19 value: false 18 value: false
20 }, 19 },
21 20
21 webTemplate: {
22 value: false
23 },
24
22 _documents: { 25 _documents: {
23 value: [] 26 value: []
24 }, 27 },
@@ -65,6 +68,10 @@ var DocumentController = exports.DocumentController = Montage.create(Component,
65 this.eventManager.addEventListener("styleSheetDirty", this, false); 68 this.eventManager.addEventListener("styleSheetDirty", this, false);
66 69
67 this.eventManager.addEventListener("addComponentFirstDraw", this, false); 70 this.eventManager.addEventListener("addComponentFirstDraw", this, false);
71
72 // Temporary add listeners for the new stage templates
73 this.eventManager.addEventListener("executeWebpageOpen", this, false);
74 this.eventManager.addEventListener("executeNewWebpage", this, false);
68 } 75 }
69 }, 76 },
70 77
@@ -130,6 +137,20 @@ var DocumentController = exports.DocumentController = Montage.create(Component,
130 } 137 }
131 }, 138 },
132 139
140 handleExecuteWebpageOpen: {
141 value: function(event) {
142 this.webTemplate = true;
143 this.handleExecuteFileOpen(event);
144 }
145 },
146
147 handleExecuteNewWebpage: {
148 value: function(event) {
149 this.webTemplate = true;
150 this.handleExecuteNewFile(event);
151 }
152 },
153
133 handleExecuteNewFile: { 154 handleExecuteNewFile: {
134 value: function(event) { 155 value: function(event) {
135 var newFileSettings = event._event.settings || {}; 156 var newFileSettings = event._event.settings || {};
@@ -235,7 +256,7 @@ var DocumentController = exports.DocumentController = Montage.create(Component,
235 this.creatingNewFile = true;//flag for timeline to identify new file flow 256 this.creatingNewFile = true;//flag for timeline to identify new file flow
236 257
237 this.application.ninja.ioMediator.fileOpen(response.uri, this.openFileCallback.bind(this)); 258 this.application.ninja.ioMediator.fileOpen(response.uri, this.openFileCallback.bind(this));
238 }else if(!!response && !response.success){ 259 } else if(!!response && !response.success){
239 //Todo: restrict directory path to the sandbox, in the dialog itself 260 //Todo: restrict directory path to the sandbox, in the dialog itself
240 alert("Unable to create file.\n [Error: Forbidden directory]"); 261 alert("Unable to create file.\n [Error: Forbidden directory]");
241 } 262 }
@@ -311,9 +332,9 @@ var DocumentController = exports.DocumentController = Montage.create(Component,
311 this.documentHackReference = doc; 332 this.documentHackReference = doc;
312 // 333 //
313 switch (doc.extension) { 334 switch (doc.extension) {
314 case 'html': case 'html': 335 case 'html':
315 //Open in designer view 336 //Open in designer view
316 Montage.create(HTMLDocument).initialize(doc, Uuid.generate(), this._createIframeElement(), this._onOpenDocument.bind(this)); 337 Montage.create(HTMLDocument).initialize(doc, Uuid.generate(), this._createIframeElement(), this._onOpenDocument.bind(this), this.webTemplate);
317 break; 338 break;
318 default: 339 default:
319 //Open in code view 340 //Open in code view
@@ -420,6 +441,7 @@ var DocumentController = exports.DocumentController = Montage.create(Component,
420 // Event Detail: Contains the current ActiveDocument 441 // Event Detail: Contains the current ActiveDocument
421 _onOpenDocument: { 442 _onOpenDocument: {
422 value: function(doc){ 443 value: function(doc){
444 this.webTemplate = false;
423 this.application.ninja.currentDocument = doc; 445 this.application.ninja.currentDocument = doc;
424 this._hideCurrentDocument(); 446 this._hideCurrentDocument();
425 this.application.ninja.stage.stageView.hideOtherDocuments(doc.uuid); 447 this.application.ninja.stage.stageView.hideOtherDocuments(doc.uuid);
diff --git a/js/controllers/elements/canvas-controller.js b/js/controllers/elements/canvas-controller.js
index b5df3911..b8894c18 100755
--- a/js/controllers/elements/canvas-controller.js
+++ b/js/controllers/elements/canvas-controller.js
@@ -34,12 +34,12 @@ exports.CanvasController = Montage.create(ElementController, {
34 } 34 }
35 } 35 }
36 }, 36 },
37 37
38 setProperties: { 38 setProperties: {
39 value: function(el, props, index) { 39 value: function(element, properties) {
40 for(var p in props) { 40 for(var property in properties) {
41 el.elementModel.controller.setProperty(el, p, props[p][index]); 41 this.setProperty(element, property, properties[property]);
42 } 42 }
43 } 43 }
44 } 44 }
45}); \ No newline at end of file 45}); \ No newline at end of file