From 23baa44e0bc7bfb24e42702c1ef58bf62da083d8 Mon Sep 17 00:00:00 2001 From: Pushkar Joshi Date: Wed, 14 Mar 2012 15:37:09 -0700 Subject: PI for pen and brush strokes --- js/data/pi/pi-data.js | 139 +++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 138 insertions(+), 1 deletion(-) (limited to 'js/data') diff --git a/js/data/pi/pi-data.js b/js/data/pi/pi-data.js index ba03c347..ebd15832 100755 --- a/js/data/pi/pi-data.js +++ b/js/data/pi/pi-data.js @@ -585,7 +585,144 @@ exports.PiData = Montage.create( Montage, { ] } ] - } + }, + SubpathPi: { + value: [ + { + label: "Stroke", + + Section: [ + [ + { + type : "color", + prop: "border", + id : "stroke" + }, + { + type : "color", + id : "fill", + prop: "background", + divider : true + } + ], + [ + { + type : "hottext", + id : "strokeSize", + prop : "strokeSize", + label : "Stroke", + valueMutator: parseFloat, + min : 1, + max : 100, + value : 1, + unit : "px", + acceptableUnits: ["pt", "px"] + } + ] + ] + } + ] + }, + BrushStrokePi: { + value: [ + { + label: "Stroke", + + Section: [ + [ + { + type : "color", + prop: "border", + id : "stroke" + }, + { + type : "color", + id : "fill", + prop: "background", + visible : false, + divider : true + } + ], + [ + { + type : "hottext", + id : "strokeSize", + prop : "strokeSize", + label : "Stroke", + valueMutator: parseFloat, + min : 1, + max : 100, + value : 1, + unit : "px", + acceptableUnits: ["pt", "px"] + }, + { + type : "hottext", + id : "strokeHardness", + prop : "strokeHardness", + label : "Hardness", + valueMutator: parseFloat, + min : 0, + max : 100, + value : 100, + unit : "%", + acceptableUnits: ["%"] + } + ] + ] + }, + { + label: "Smoothing", + Section: [ + [ + { + type: "checkbox", + id: "doSmoothing", + prop: "doSmoothing", + defaultValue: false, + value: "Smoothing", + checked: false + }, + { + type : "hottext", + id : "strokeSmoothing", + prop : "strokeSmoothing", + label : "", + valueMutator: parseFloat, + min : 0, + max : 100, + value : 0 + } + ] + ] + }, + { + label: "Calligraphic", + Section: [ + [ + { + type: "checkbox", + id: "isCalligraphic", + prop: "isCalligraphic", + defaultValue: false, + value: "Calligraphic", + checked: false + }, + { + type : "hottext", + id : "strokeAngle", + prop : "strokeAngle", + label : "", + valueMutator: parseFloat, + min : -90, + max : 90, + value : 0 + } + ] + ] + } + ] //value: [ + } //BrushStrokePi: { }); -- cgit v1.2.3 From e574f722864a246bad40d3f5a4e59f7ccb206ea9 Mon Sep 17 00:00:00 2001 From: Pushkar Joshi Date: Thu, 15 Mar 2012 14:33:48 -0700 Subject: update values in the PI from values of the selected brush stroke or pen tool path --- js/data/pi/pi-data.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'js/data') diff --git a/js/data/pi/pi-data.js b/js/data/pi/pi-data.js index ebd15832..9d90aa3d 100755 --- a/js/data/pi/pi-data.js +++ b/js/data/pi/pi-data.js @@ -680,14 +680,14 @@ exports.PiData = Montage.create( Montage, { id: "doSmoothing", prop: "doSmoothing", defaultValue: false, - value: "Smoothing", + value: "Y/N", checked: false }, { type : "hottext", id : "strokeSmoothing", prop : "strokeSmoothing", - label : "", + label : "Amount", valueMutator: parseFloat, min : 0, max : 100, @@ -705,18 +705,20 @@ exports.PiData = Montage.create( Montage, { id: "isCalligraphic", prop: "isCalligraphic", defaultValue: false, - value: "Calligraphic", - checked: false + value: "Y/N", + checked: false, + divider : true }, { type : "hottext", id : "strokeAngle", prop : "strokeAngle", - label : "", + label : "Angle", valueMutator: parseFloat, min : -90, max : 90, - value : 0 + value : 0, + unit : "deg." } ] ] -- cgit v1.2.3 From 92bc54df4acfec849568ab619150a5da49c087fa Mon Sep 17 00:00:00 2001 From: Pushkar Joshi Date: Tue, 20 Mar 2012 10:24:15 -0700 Subject: revert to using the angle without flipping its sign...fixing some minor bugs and code cleanup GOOD status before doing 3D unprojection step --- js/data/pi/pi-data.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'js/data') diff --git a/js/data/pi/pi-data.js b/js/data/pi/pi-data.js index 9d90aa3d..ad2f3088 100755 --- a/js/data/pi/pi-data.js +++ b/js/data/pi/pi-data.js @@ -649,7 +649,7 @@ exports.PiData = Montage.create( Montage, { id : "strokeSize", prop : "strokeSize", label : "Stroke", - valueMutator: parseFloat, + valueMutator: parseInt, min : 1, max : 100, value : 1, @@ -661,7 +661,7 @@ exports.PiData = Montage.create( Montage, { id : "strokeHardness", prop : "strokeHardness", label : "Hardness", - valueMutator: parseFloat, + valueMutator: parseInt, min : 0, max : 100, value : 100, -- cgit v1.2.3 From 61a419422b1a05a779fd9a66c53de3fa8ab5f65a Mon Sep 17 00:00:00 2001 From: Ananya Sen Date: Thu, 22 Mar 2012 10:28:34 -0700 Subject: - enable/disable save, saveAs, saveAll, close, closeAll as per documents open - added close file and close all menu items Signed-off-by: Ananya Sen Conflicts: js/helper-classes/3D/draw-utils.js Signed-off-by: Ananya Sen --- js/data/menu-data.js | 830 +++++++++++++++++++++++++++------------------------ 1 file changed, 440 insertions(+), 390 deletions(-) (limited to 'js/data') diff --git a/js/data/menu-data.js b/js/data/menu-data.js index 40512f5d..093ecf14 100755 --- a/js/data/menu-data.js +++ b/js/data/menu-data.js @@ -4,414 +4,464 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. */ -var Montage = require("montage/core/core").Montage; +var Montage = require("montage/core/core").Montage; exports.MenuData = Montage.create( Montage, { topLevelMenu: { value: [ - { - "header": "File", - "entries": [ - { - "displayText" : "New Project", - "hasSubMenu" : false, - "enabled": false, - "action": "executeNewProject" - }, - { - "displayText" : "New File", - "hasSubMenu" : false, - "enabled": true, - "action": "executeNewFile" - }, - { - "displayText" : "Open File", - "hasSubMenu" : false, - "enabled": true, - "action": "executeFileOpen" - }, - { - "displayText" : "Close File", - "hasSubMenu" : false, - "enabled": true, - "action": "executeFileClose" - }, - { - "displayText" : "", - "separator": true - }, - { - "displayText" : "Save", - "hasSubMenu" : false, - "enabled": true, - "action": "executeSave" - }, - { - "displayText" : "Save As", - "hasSubMenu" : false, - "enabled": true, - "action":"executeSaveAs" - }, - { - "displayText" : "Save All", - "hasSubMenu" : false, - "enabled": true, - "action": "executeSaveAll" - }, - { - "displayText" : "", - "separator": true - }, - { - "displayText" : "Open Project", - "hasSubMenu" : false, - "enabled": false - }, - { - "displayText" : "Open Recent", - "hasSubMenu" : false, - "enabled": false - }, - { - "displayText" : "Close Project", - "hasSubMenu" : false, - "enabled": false - } - ] - }, - { - "header": "Edit", - "entries": [ - { - "displayText" : "Undo", - "hasSubMenu" : false, - "enabled": { - "value": false, - "boundObj": "undocontroller", - "boundProperty": "canUndo" - }, - "action": "executeUndo" - }, - { - "displayText" : "Redo", - "hasSubMenu" : false, - "enabled": { - "value": false, - "boundObj": "undocontroller", - "boundProperty": "canRedo" - }, - "action": "executeRedo" - }, - { - "displayText" : "Cut", - "hasSubMenu" : false, - "enabled": true - }, - { - "displayText" : "Copy", - "hasSubMenu" : false, - "enabled": true - }, - { - "displayText" : "Paste", - "hasSubMenu" : false, - "enabled": true - } - ] - }, - { - "header": "View", - "entries": [ - { - "displayText" : "Zoom In", - "hasSubMenu" : false, - "enabled": true - }, - { - "displayText" : "Zoom Out", - "hasSubMenu" : false, - "enabled": true - }, - { - "displayText" : "", - "separator": true - }, - { - "displayText" : "Live Preview", - "hasSubMenu" : false, - "enabled": true, - "checked": { - "value": false, - "boundProperty": "livePreview" - } - }, - { - "displayText" : "Chrome Preview", - "hasSubMenu" : false, - "enabled": true, - "checked": { - "value": false, - "boundProperty": "chromePreview" - } - }, - { - "displayText" : "Layout View", - "hasSubMenu" : false, - "enabled": true, - "submenu": true, - "entries": [ - { - "displayText" : "View All", - "hasSubMenu" : false, - "radio": true, - "enabled": true, - "checked": { - "value": true, - "boundProperty": "layoutAll" + { + "header": "File", + "entries": [ + { + "displayText" : "New Project", + "hasSubMenu" : false, + "enabled": false, + "action": "executeNewProject" + }, + { + "displayText" : "New File", + "hasSubMenu" : false, + "enabled": true, + "action": "executeNewFile" + }, + { + "displayText" : "Open File", + "hasSubMenu" : false, + "enabled": true, + "action": "executeFileOpen" + }, + { + "displayText" : "Close File", + "hasSubMenu" : false, + "enabled": { + "value": false, + "boundObj": "documentController", + "boundProperty": "activeDocument", + "oneway": true, + "boundValueMutator": function(activeDocument){ + if(activeDocument !== null){return true;} + else{return false;} } }, - { - "displayText" : "View Items Only", - "hasSubMenu" : false, - "radio": true, - "enabled": true, - "checked": { - "value": false, - "boundProperty": "layoutItems" + "action": "executeFileClose" + }, + { + "displayText" : "Close All", + "hasSubMenu" : false, + "enabled": { + "value": false, + "boundObj": "documentController", + "boundProperty": "activeDocument", + "oneway": true, + "boundValueMutator": function(activeDocument){ + if(activeDocument !== null){return true;} + else{return false;} } }, - { - "displayText" : "Off", - "hasSubMenu" : false, - "radio": true, - "enabled": true, - "checked": { - "value": false, - "boundProperty": "layoutOff" + "action": "executeFileCloseAll" + }, + { + "displayText" : "", + "separator": true + }, + { + "displayText" : "Save", + "hasSubMenu" : false, + "enabled": { + "value": false, + "boundObj": "documentController", + "boundProperty": "canSave", + "oneway": true + }, + "action": "executeSave" + }, + { + "displayText" : "Save As", + "hasSubMenu" : false, + "enabled": { + "value": false, + "boundObj": "documentController", + "boundProperty": "activeDocument", + "oneway": true, + "boundValueMutator": function(activeDocument){ + if(activeDocument !== null){return true;} + else{return false;} } - } - ] - }, - { - "displayText" : "Snap", - "hasSubMenu" : false, - "enabled": true, - "checked": { - "value": true, - "boundProperty": "snap" - } - - }, - { - "displayText" : "Snap To", - "hasSubMenu" : false, - "enabled": { - "value": true, - "boundObj": "appModel", - "boundProperty": "snap" - }, - "submenu": true, - "entries": [ - { - "displayText" : "Grid", - "hasSubMenu" : false, - "enabled": true, - "checked": { - "value": true, - "boundProperty": "snapGrid" + }, + "action":"executeSaveAs" + }, + { + "displayText" : "Save All", + "hasSubMenu" : false, + "enabled": { + "value": false, + "boundObj": "documentController", + "boundProperty": "canSaveAll", + "oneway": true, + "boundValueMutator": function(canSaveAll){ + if(canSaveAll === true){return true;} + else{return false;} } }, - { - "displayText" : "Objects", - "hasSubMenu" : false, - "enabled": true, - "checked": { - "value": true, - "boundProperty": "snapObjects" + "action": "executeSaveAll" + }, + { + "displayText" : "", + "separator": true + }, + { + "displayText" : "Open Project", + "hasSubMenu" : false, + "enabled": false + }, + { + "displayText" : "Open Recent", + "hasSubMenu" : false, + "enabled": false + }, + { + "displayText" : "Close Project", + "hasSubMenu" : false, + "enabled": false + } + ] + }, + { + "header": "Edit", + "entries": [ + { + "displayText" : "Undo", + "hasSubMenu" : false, + "enabled": { + "value": false, + "boundObj": "undocontroller", + "boundProperty": "canUndo", + "oneway": true + }, + "action": "executeUndo" + }, + { + "displayText" : "Redo", + "hasSubMenu" : false, + "enabled": { + "value": false, + "boundObj": "undocontroller", + "boundProperty": "canRedo", + "oneway": true + }, + "action": "executeRedo" + }, + { + "displayText" : "Cut", + "hasSubMenu" : false, + "enabled": true + }, + { + "displayText" : "Copy", + "hasSubMenu" : false, + "enabled": true + }, + { + "displayText" : "Paste", + "hasSubMenu" : false, + "enabled": true + } + ] + }, + { + "header": "View", + "entries": [ + { + "displayText" : "Zoom In", + "hasSubMenu" : false, + "enabled": true + }, + { + "displayText" : "Zoom Out", + "hasSubMenu" : false, + "enabled": true + }, + { + "displayText" : "", + "separator": true + }, + { + "displayText" : "Live Preview", + "hasSubMenu" : false, + "enabled": true, + "checked": { + "value": false, + "boundProperty": "livePreview" + } + }, + { + "displayText" : "Chrome Preview", + "hasSubMenu" : false, + "enabled": true, + "checked": { + "value": false, + "boundProperty": "chromePreview" + } + }, + { + "displayText" : "Layout View", + "hasSubMenu" : false, + "enabled": true, + "submenu": true, + "entries": [ + { + "displayText" : "View All", + "hasSubMenu" : false, + "radio": true, + "enabled": true, + "checked": { + "value": true, + "boundProperty": "layoutAll" + } + }, + { + "displayText" : "View Items Only", + "hasSubMenu" : false, + "radio": true, + "enabled": true, + "checked": { + "value": false, + "boundProperty": "layoutItems" + } + }, + { + "displayText" : "Off", + "hasSubMenu" : false, + "radio": true, + "enabled": true, + "checked": { + "value": false, + "boundProperty": "layoutOff" + } } + ] + }, + { + "displayText" : "Snap", + "hasSubMenu" : false, + "enabled": true, + "checked": { + "value": true, + "boundProperty": "snap" + } + + }, + { + "displayText" : "Snap To", + "hasSubMenu" : false, + "enabled": { + "value": true, + "boundObj": "appModel", + "boundProperty": "snap", + "oneway": true }, - { - "displayText" : "Snap Align", - "hasSubMenu" : false, - "enabled": true, - "checked": { - "value": true, - "boundProperty": "snapAlign" + "submenu": true, + "entries": [ + { + "displayText" : "Grid", + "hasSubMenu" : false, + "enabled": true, + "checked": { + "value": true, + "boundProperty": "snapGrid" + } + }, + { + "displayText" : "Objects", + "hasSubMenu" : false, + "enabled": true, + "checked": { + "value": true, + "boundProperty": "snapObjects" + } + }, + { + "displayText" : "Snap Align", + "hasSubMenu" : false, + "enabled": true, + "checked": { + "value": true, + "boundProperty": "snapAlign" + } } + ] + }, + { + "displayText" : "Show 3D Grid", + "hasSubMenu" : false, + "enabled": true, + "checked": { + "value": false, + "boundProperty": "show3dGrid" + } + }, + { + "displayText" : "", + "separator": true + }, + { + "displayText" : "Front View", + "hasSubMenu" : false, + "enabled": true, + "radio": true, + "checked": { + "value": true, + "boundProperty": "frontStageView" + } + }, + { + "displayText" : "Top View", + "hasSubMenu" : false, + "enabled": true, + "radio": true, + "checked": { + "value": true, + "boundProperty": "topStageView" + } + }, + { + "displayText" : "Side View", + "hasSubMenu" : false, + "enabled": true, + "radio": true, + "checked": { + "value": true, + "boundProperty": "sideStageView" + } + }, + { + "displayText" : "", + "separator": true + }, + { + "displayText" : "Debug", + "hasSubMenu" : false, + "enabled": true, + "checked": { + "value": true, + "boundProperty": "debug" } - ] - }, - { - "displayText" : "Show 3D Grid", - "hasSubMenu" : false, - "enabled": true, - "checked": { - "value": false, - "boundProperty": "show3dGrid" - } - }, - { - "displayText" : "", - "separator": true - }, - { - "displayText" : "Front View", - "hasSubMenu" : false, - "enabled": true, - "radio": true, - "checked": { - "value": true, - "boundProperty": "frontStageView" - } - }, - { - "displayText" : "Top View", - "hasSubMenu" : false, - "enabled": true, - "radio": true, - "checked": { - "value": true, - "boundProperty": "topStageView" - } - }, - { - "displayText" : "Side View", - "hasSubMenu" : false, - "enabled": true, - "radio": true, - "checked": { - "value": true, - "boundProperty": "sideStageView" - } - }, - { - "displayText" : "", - "separator": true - }, - { - "displayText" : "Debug", - "hasSubMenu" : false, - "enabled": true, - "checked": { - "value": true, - "boundProperty": "debug" - } - } - ] - }, - { - "header": "Window", - "entries": [ - { - "displayText" : "Tools", - "hasSubMenu" : false, - "enabled": true - }, - { - "displayText" : "Timeline", - "hasSubMenu" : false, - "enabled": true - }, - { - "displayText" : "Properties", - "hasSubMenu" : false, - "enabled": true, - "checked": { - "value": true, - "boundProperty": "PropertiesPanel" - } - }, - { - "displayText" : "Project", - "hasSubMenu" : false, - "enabled": true, - "checked": { - "value": true, - "boundProperty": "ProjectPanel" - } - }, - { - "displayText" : "Color", - "hasSubMenu" : false, - "enabled": true, - "checked": { - "value": true, - "boundProperty": "ColorPanel" - } - }, - { - "displayText" : "Components", - "hasSubMenu" : false, - "enabled": true, - "checked": { - "value": true, - "boundProperty": "ComponentsPanel" - } - }, - { - "displayText" : "CSS", - "hasSubMenu" : false, - "enabled": true, - "checked": { - "value": true, - "boundProperty": "CSSPanel" } - }, - { - "displayText" : "Materials", - "hasSubMenu" : false, - "enabled": true, - "checked": { - "value": true, - "boundProperty": "MaterialsPanel" + ] + }, + { + "header": "Window", + "entries": [ + { + "displayText" : "Tools", + "hasSubMenu" : false, + "enabled": true + }, + { + "displayText" : "Timeline", + "hasSubMenu" : false, + "enabled": true + }, + { + "displayText" : "Properties", + "hasSubMenu" : false, + "enabled": true, + "checked": { + "value": true, + "boundProperty": "PropertiesPanel" + } + }, + { + "displayText" : "Project", + "hasSubMenu" : false, + "enabled": true, + "checked": { + "value": true, + "boundProperty": "ProjectPanel" + } + }, + { + "displayText" : "Color", + "hasSubMenu" : false, + "enabled": true, + "checked": { + "value": true, + "boundProperty": "ColorPanel" + } + }, + { + "displayText" : "Components", + "hasSubMenu" : false, + "enabled": true, + "checked": { + "value": true, + "boundProperty": "ComponentsPanel" + } + }, + { + "displayText" : "CSS", + "hasSubMenu" : false, + "enabled": true, + "checked": { + "value": true, + "boundProperty": "CSSPanel" + } + }, + { + "displayText" : "Materials", + "hasSubMenu" : false, + "enabled": true, + "checked": { + "value": true, + "boundProperty": "MaterialsPanel" + } + }, + { + "displayText" : "Presets", + "hasSubMenu" : false, + "enabled": true, + "checked": { + "value": true, + "boundProperty": "PresetsPanel" + } + }, + { + "displayText" : "Code", + "hasSubMenu" : false, + "enabled": true } - }, - { - "displayText" : "Presets", - "hasSubMenu" : false, - "enabled": true, - "checked": { - "value": true, - "boundProperty": "PresetsPanel" + ] + }, + { + "header": "Help", + "entries": [ + { + "displayText" : "Ninja FAQ", + "hasSubMenu" : false, + "enabled": true, + "action": "executeHelpFAQ" + }, + { + "displayText" : "Ninja Forums", + "hasSubMenu" : false, + "enabled": true, + "action": "executeHelpForums" + }, + { + "displayText" : "Help Topics", + "hasSubMenu" : false, + "enabled": true, + "action": "executeHelpTopics" + }, + { + "displayText" : "About Ninja...", + "hasSubMenu" : false, + "enabled": true, + "action": "executeHelpAbout" } - }, - { - "displayText" : "Code", - "hasSubMenu" : false, - "enabled": true - } - ] - }, - { - "header": "Help", - "entries": [ - { - "displayText" : "Ninja FAQ", - "hasSubMenu" : false, - "enabled": true, - "action": "executeHelpFAQ" - }, - { - "displayText" : "Ninja Forums", - "hasSubMenu" : false, - "enabled": true, - "action": "executeHelpForums" - }, - { - "displayText" : "Help Topics", - "hasSubMenu" : false, - "enabled": true, - "action": "executeHelpTopics" - }, - { - "displayText" : "About Ninja...", - "hasSubMenu" : false, - "enabled": true, - "action": "executeHelpAbout" - } - ] - } - ] + ] + } + ] } }); -- cgit v1.2.3 From 3fe56ceacc70f839887d0d368ea125cb85f54a8c Mon Sep 17 00:00:00 2001 From: Ananya Sen Date: Thu, 22 Mar 2012 15:33:12 -0700 Subject: disable more menus if the active document is not in design view Signed-off-by: Ananya Sen --- js/data/menu-data.js | 110 ++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 100 insertions(+), 10 deletions(-) (limited to 'js/data') diff --git a/js/data/menu-data.js b/js/data/menu-data.js index 093ecf14..12007f4a 100755 --- a/js/data/menu-data.js +++ b/js/data/menu-data.js @@ -174,12 +174,30 @@ exports.MenuData = Montage.create( Montage, { { "displayText" : "Zoom In", "hasSubMenu" : false, - "enabled": true + "enabled": { + "value": false, + "boundObj": "documentController", + "boundProperty": "activeDocument", + "oneway": true, + "boundValueMutator": function(activeDocument){ + if((activeDocument !== null) && (activeDocument.currentView === "design")){return true;} + else{return false;} + } + } }, { "displayText" : "Zoom Out", "hasSubMenu" : false, - "enabled": true + "enabled": { + "value": false, + "boundObj": "documentController", + "boundProperty": "activeDocument", + "oneway": true, + "boundValueMutator": function(activeDocument){ + if((activeDocument !== null) && (activeDocument.currentView === "design")){return true;} + else{return false;} + } + } }, { "displayText" : "", @@ -188,7 +206,16 @@ exports.MenuData = Montage.create( Montage, { { "displayText" : "Live Preview", "hasSubMenu" : false, - "enabled": true, + "enabled": { + "value": false, + "boundObj": "documentController", + "boundProperty": "activeDocument", + "oneway": true, + "boundValueMutator": function(activeDocument){ + if((activeDocument !== null) && (activeDocument.currentView === "design")){return true;} + else{return false;} + } + }, "checked": { "value": false, "boundProperty": "livePreview" @@ -197,7 +224,16 @@ exports.MenuData = Montage.create( Montage, { { "displayText" : "Chrome Preview", "hasSubMenu" : false, - "enabled": true, + "enabled": { + "value": false, + "boundObj": "documentController", + "boundProperty": "activeDocument", + "oneway": true, + "boundValueMutator": function(activeDocument){ + if((activeDocument !== null) && (activeDocument.currentView === "design")){return true;} + else{return false;} + } + }, "checked": { "value": false, "boundProperty": "chromePreview" @@ -206,7 +242,16 @@ exports.MenuData = Montage.create( Montage, { { "displayText" : "Layout View", "hasSubMenu" : false, - "enabled": true, + "enabled": { + "value": false, + "boundObj": "documentController", + "boundProperty": "activeDocument", + "oneway": true, + "boundValueMutator": function(activeDocument){ + if((activeDocument !== null) && (activeDocument.currentView === "design")){return true;} + else{return false;} + } + }, "submenu": true, "entries": [ { @@ -244,7 +289,16 @@ exports.MenuData = Montage.create( Montage, { { "displayText" : "Snap", "hasSubMenu" : false, - "enabled": true, + "enabled": { + "value": false, + "boundObj": "documentController", + "boundProperty": "activeDocument", + "oneway": true, + "boundValueMutator": function(activeDocument){ + if((activeDocument !== null) && (activeDocument.currentView === "design")){return true;} + else{return false;} + } + }, "checked": { "value": true, "boundProperty": "snap" @@ -294,7 +348,16 @@ exports.MenuData = Montage.create( Montage, { { "displayText" : "Show 3D Grid", "hasSubMenu" : false, - "enabled": true, + "enabled": { + "value": false, + "boundObj": "documentController", + "boundProperty": "activeDocument", + "oneway": true, + "boundValueMutator": function(activeDocument){ + if((activeDocument !== null) && (activeDocument.currentView === "design")){return true;} + else{return false;} + } + }, "checked": { "value": false, "boundProperty": "show3dGrid" @@ -307,7 +370,16 @@ exports.MenuData = Montage.create( Montage, { { "displayText" : "Front View", "hasSubMenu" : false, - "enabled": true, + "enabled": { + "value": false, + "boundObj": "documentController", + "boundProperty": "activeDocument", + "oneway": true, + "boundValueMutator": function(activeDocument){ + if((activeDocument !== null) && (activeDocument.currentView === "design")){return true;} + else{return false;} + } + }, "radio": true, "checked": { "value": true, @@ -317,7 +389,16 @@ exports.MenuData = Montage.create( Montage, { { "displayText" : "Top View", "hasSubMenu" : false, - "enabled": true, + "enabled": { + "value": false, + "boundObj": "documentController", + "boundProperty": "activeDocument", + "oneway": true, + "boundValueMutator": function(activeDocument){ + if((activeDocument !== null) && (activeDocument.currentView === "design")){return true;} + else{return false;} + } + }, "radio": true, "checked": { "value": true, @@ -327,7 +408,16 @@ exports.MenuData = Montage.create( Montage, { { "displayText" : "Side View", "hasSubMenu" : false, - "enabled": true, + "enabled": { + "value": false, + "boundObj": "documentController", + "boundProperty": "activeDocument", + "oneway": true, + "boundValueMutator": function(activeDocument){ + if((activeDocument !== null) && (activeDocument.currentView === "design")){return true;} + else{return false;} + } + }, "radio": true, "checked": { "value": true, -- cgit v1.2.3 From 6b9bfb63f6bc22ef1095dc11816826bb83a2c408 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Mon, 26 Mar 2012 15:55:38 -0700 Subject: Cleanup of the components panel Renamed to naming convention. Deleted un-used file. Signed-off-by: Valerio Virgillito --- js/data/panels-data.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'js/data') diff --git a/js/data/panels-data.js b/js/data/panels-data.js index 2422f5e7..7a2d817a 100644 --- a/js/data/panels-data.js +++ b/js/data/panels-data.js @@ -55,8 +55,8 @@ exports.PanelsData = Montage.create(Montage, { scrollable: true, collapsed: true, open: true, - modulePath: "js/panels/Components/ComponentsPanelBase.reel", - moduleName: "ComponentsPanelBase" + modulePath: "js/panels/components-panel.reel", + moduleName: "ComponentsPanel" }, // { // name: "Project/Assets", -- cgit v1.2.3 From 4c2948447482fe57110e7fd674e362bbbd5814b6 Mon Sep 17 00:00:00 2001 From: Ananya Sen Date: Wed, 28 Mar 2012 14:00:28 -0700 Subject: IKNINJA-719 - removed Zoom In/Zoom Out under View menu in the Main menu Disabled cut, copy, paste, debug, since that functionality is not there yet Signed-off-by: Ananya Sen --- js/data/menu-data.js | 40 ++++------------------------------------ 1 file changed, 4 insertions(+), 36 deletions(-) (limited to 'js/data') diff --git a/js/data/menu-data.js b/js/data/menu-data.js index 12007f4a..3333d209 100755 --- a/js/data/menu-data.js +++ b/js/data/menu-data.js @@ -154,55 +154,23 @@ exports.MenuData = Montage.create( Montage, { { "displayText" : "Cut", "hasSubMenu" : false, - "enabled": true + "enabled": false }, { "displayText" : "Copy", "hasSubMenu" : false, - "enabled": true + "enabled": false }, { "displayText" : "Paste", "hasSubMenu" : false, - "enabled": true + "enabled": false } ] }, { "header": "View", "entries": [ - { - "displayText" : "Zoom In", - "hasSubMenu" : false, - "enabled": { - "value": false, - "boundObj": "documentController", - "boundProperty": "activeDocument", - "oneway": true, - "boundValueMutator": function(activeDocument){ - if((activeDocument !== null) && (activeDocument.currentView === "design")){return true;} - else{return false;} - } - } - }, - { - "displayText" : "Zoom Out", - "hasSubMenu" : false, - "enabled": { - "value": false, - "boundObj": "documentController", - "boundProperty": "activeDocument", - "oneway": true, - "boundValueMutator": function(activeDocument){ - if((activeDocument !== null) && (activeDocument.currentView === "design")){return true;} - else{return false;} - } - } - }, - { - "displayText" : "", - "separator": true - }, { "displayText" : "Live Preview", "hasSubMenu" : false, @@ -431,7 +399,7 @@ exports.MenuData = Montage.create( Montage, { { "displayText" : "Debug", "hasSubMenu" : false, - "enabled": true, + "enabled": false, "checked": { "value": true, "boundProperty": "debug" -- cgit v1.2.3 From c2e9ed5bc4cbef870283784fa2a91f43ff72cade Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Mon, 2 Apr 2012 11:14:46 -0700 Subject: IKNinja-1410 - Inner Radius should be restricted to 99%. Signed-off-by: Nivesh Rajbhandari --- js/data/pi/pi-data.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js/data') diff --git a/js/data/pi/pi-data.js b/js/data/pi/pi-data.js index 7edc90d8..07017f09 100755 --- a/js/data/pi/pi-data.js +++ b/js/data/pi/pi-data.js @@ -578,7 +578,7 @@ exports.PiData = Montage.create( Montage, { valueMutator: parseFloat, value : 0, min : 0, - max : 100, + max : 99, unit : "%", acceptableUnits: ["%"] -- cgit v1.2.3 From d5b429f4d1fad1f9b83e81d2d742d43ec39bd585 Mon Sep 17 00:00:00 2001 From: Ananya Sen Date: Wed, 4 Apr 2012 15:14:33 -0700 Subject: [CR] Keep Save related menu items always enabled, if there is an open document Signed-off-by: Ananya Sen --- js/data/menu-data.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'js/data') diff --git a/js/data/menu-data.js b/js/data/menu-data.js index 3333d209..a1fe2703 100755 --- a/js/data/menu-data.js +++ b/js/data/menu-data.js @@ -70,8 +70,12 @@ exports.MenuData = Montage.create( Montage, { "enabled": { "value": false, "boundObj": "documentController", - "boundProperty": "canSave", - "oneway": true + "boundProperty": "activeDocument", + "oneway": true, + "boundValueMutator": function(activeDocument){ + if(activeDocument !== null){return true;} + else{return false;} + } }, "action": "executeSave" }, @@ -96,10 +100,10 @@ exports.MenuData = Montage.create( Montage, { "enabled": { "value": false, "boundObj": "documentController", - "boundProperty": "canSaveAll", + "boundProperty": "activeDocument", "oneway": true, - "boundValueMutator": function(canSaveAll){ - if(canSaveAll === true){return true;} + "boundValueMutator": function(activeDocument){ + if(activeDocument !== null){return true;} else{return false;} } }, -- cgit v1.2.3 From 4900f2e6e346df18b1b5a2ac89da5019644ac98a Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Mon, 9 Apr 2012 16:47:35 -0700 Subject: adding a history panel Signed-off-by: Valerio Virgillito --- js/data/panels-data.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'js/data') diff --git a/js/data/panels-data.js b/js/data/panels-data.js index 7a2d817a..f613a3be 100644 --- a/js/data/panels-data.js +++ b/js/data/panels-data.js @@ -93,6 +93,18 @@ exports.PanelsData = Montage.create(Montage, { open: true, modulePath: "js/panels/presets/content.reel", moduleName: "content" + }, + { + name: "History", + minHeight: 100, + height: 100, + maxHeight: null, + flexible: true, + collapsed: true, + scrollable: true, + open: true, + modulePath: "js/panels/history-panel/history.reel