From 0e1a276f19ea70009c5a649e9667861d7c346a7e Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Wed, 6 Jun 2012 00:25:27 -0700 Subject: first iteration of adding serializable to ninja plus other changes to run the latest montage Signed-off-by: Valerio Virgillito --- js/ninja.reel/ninja.html | 4 +- js/ninja.reel/ninja.js | 160 +++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 157 insertions(+), 7 deletions(-) (limited to 'js/ninja.reel') diff --git a/js/ninja.reel/ninja.html b/js/ninja.reel/ninja.html index a98fca60..a63422fb 100755 --- a/js/ninja.reel/ninja.html +++ b/js/ninja.reel/ninja.html @@ -163,7 +163,7 @@ "element": {"#": "stageMode"} }, "bindings" : { - "livePreview": {"<<->": "@appModel.livePreview"} + "livePreview": {"<->": "@appModel.livePreview"} } }, @@ -310,7 +310,7 @@ "selectObjectsOnAddition": true }, "bindings": { - "content": {"<<->": "@documentController.documents"} + "content": {"<->": "@documentController.documents"} } }, diff --git a/js/ninja.reel/ninja.js b/js/ninja.reel/ninja.js index a12270a0..e4f447d2 100755 --- a/js/ninja.reel/ninja.js +++ b/js/ninja.reel/ninja.js @@ -14,22 +14,172 @@ var NjUtils = require("js/lib/NJUtils").NJUtils; exports.Ninja = Montage.create(Component, { - ninjaVersion: { - value: null + // SERIALIZABLE Properties + ////////////////////////////// + rulerTop: { + value: null, + serializable: true + }, + + rulerLeft: { + value: null, + serializable: true + }, + + appModel: { + value: null, + serializable: true }, toolsData: { - value: null + value: null, + serializable: true }, - appData: { - value: AppData + toolsList: { + value: null, + serializable: true + }, + + toolsProperties: { + value: null, + serializable: true + }, + + stage: { + value: null, + serializable: true + }, + + elementMediator: { + value: null, + serializable: true + }, + + dragDropMediator: { + value: null, + serializable: true + }, + + undocontroller: { + value: null, + serializable: true + }, + + selectionController: { + value: null, + serializable: true + }, + + documentController: { + value: null, + serializable: true + }, + + popupManager: { + value: null, + serializable: true + }, + + colorController: { + value: null, + serializable: true + }, + + stylesController: { + value: null, + serializable: true + }, + + presetsController: { + value: null, + serializable: true + }, + + filePickerController: { + value: null, + serializable: true + }, + + newFileController: { + value: null, + serializable: true + }, + + coreIoApi: { + value: null, + serializable: true + }, + + documentBar: { + value: null, + serializable: true + }, + + editorViewOptions: { + value: null, + serializable: true + }, + + ioMediator: { + value: null, + serializable: true + }, + + timeline: { + value: null, + serializable: true + }, + + mainMenuController: { + value: null, + serializable: true + }, + + codeEditorController: { + value: null, + serializable: true + }, + + rightPanelContainer: { + value: null, + serializable: true + }, + + panelSplitter: { + value: null, + serializable: true + }, + + timelineSplitter: { + value: null, + serializable: true + }, + + toolsSplitter: { + value: null, + serializable: true + }, + + optionsSplitter: { + value: null, + serializable: true }, documentList: { + value: null, + serializable: true + }, + ////////////////////////////// + + ninjaVersion: { value: null }, + appData: { + value: AppData + }, + currentDocument: { get: function() { if(this.documentList.selectedObjects) { -- cgit v1.2.3 From 16d859a284805cd8bf14187fd421b6a14e6d8912 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Tue, 12 Jun 2012 15:12:27 -0700 Subject: remove serializable from custom section Signed-off-by: Valerio Virgillito --- js/ninja.reel/ninja.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'js/ninja.reel') diff --git a/js/ninja.reel/ninja.js b/js/ninja.reel/ninja.js index 8b874a36..c7bdfc0e 100755 --- a/js/ninja.reel/ninja.js +++ b/js/ninja.reel/ninja.js @@ -452,8 +452,7 @@ exports.Ninja = Montage.create(Component, { openDocument: { value: function(doc) { this.documentList.content.push(doc); - // This is not needed with the latest 0.10 montage. - // TODO: Remove this when integrating the next montage + // TODO: Check why this is still needed this.documentList.selectedObjects = [doc]; } -- cgit v1.2.3 From a75947d69f571d723552f926f94d195514a01cbd Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Tue, 12 Jun 2012 23:04:07 -0700 Subject: fixed document switching issues Signed-off-by: Valerio Virgillito --- js/ninja.reel/ninja.html | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'js/ninja.reel') diff --git a/js/ninja.reel/ninja.html b/js/ninja.reel/ninja.html index 00740ea9..405f57da 100755 --- a/js/ninja.reel/ninja.html +++ b/js/ninja.reel/ninja.html @@ -291,8 +291,7 @@ "selectionController": { "prototype": "js/controllers/selection-controller", "bindings" : { - "currentDocument": {"<-": "@documentList.selectedObjects.0"}, - "selectedElements": {"<-": "@documentList.selectedObjects.0.model.selection"} + "currentDocument": {"<-": "@documentList.selectedObjects.0"} } }, -- cgit v1.2.3