From 486d9a31a85dd833a1c798049a00403756703034 Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Mon, 6 Feb 2012 11:35:49 -0800 Subject: Support use WebGL checkbox in the PI. Signed-off-by: Nivesh Rajbhandari --- js/data/pi/pi-data.js | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'js/data') diff --git a/js/data/pi/pi-data.js b/js/data/pi/pi-data.js index dd75e255..8ccf17cc 100644 --- a/js/data/pi/pi-data.js +++ b/js/data/pi/pi-data.js @@ -367,6 +367,16 @@ exports.PiData = Montage.create( Montage, { label: "Materials", Section: [ + [ + { + type: "checkbox", + id: "useWebGl", + prop: "useWebGl", + defaultValue: false, + value: "Use WebGL", + checked: false + } + ], [ { type: "dropdown", @@ -432,6 +442,16 @@ exports.PiData = Montage.create( Montage, { label: "Materials", Section: [ + [ + { + type: "checkbox", + id: "useWebGl", + prop: "useWebGl", + defaultValue: false, + value: "Use WebGL", + checked: false + } + ], [ { type: "dropdown", @@ -505,6 +525,16 @@ exports.PiData = Montage.create( Montage, { label: "Materials", Section: [ + [ + { + type: "checkbox", + id: "useWebGl", + prop: "useWebGl", + defaultValue: false, + value: "Use WebGL", + checked: false + } + ], [ { type: "dropdown", -- cgit v1.2.3 From f94b0c5ada403379b3ff8a900c2a2aabcecce49e Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Mon, 6 Feb 2012 14:03:40 -0800 Subject: Add enabled property for ComboBox to support enabling/disabling materials dropdowns in the PI. Signed-off-by: Nivesh Rajbhandari --- js/data/pi/pi-data.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'js/data') diff --git a/js/data/pi/pi-data.js b/js/data/pi/pi-data.js index 8ccf17cc..901ca37f 100644 --- a/js/data/pi/pi-data.js +++ b/js/data/pi/pi-data.js @@ -385,6 +385,7 @@ exports.PiData = Montage.create( Montage, { label: "Stroke", labelField: "_name", items : { boundObject: "this.application.ninja.appModel", boundProperty: "materials" }, + enabled: { boundObject: "this.controls", boundProperty: "useWebGl" }, divider : true } ], @@ -395,7 +396,8 @@ exports.PiData = Montage.create( Montage, { prop: "fillMaterial", label: "Fill", labelField: "_name", - items : { boundObject: "this.application.ninja.appModel", boundProperty: "materials" } + items : { boundObject: "this.application.ninja.appModel", boundProperty: "materials" }, + enabled: { boundObject: "this.controls", boundProperty: "useWebGl" } } ] ] @@ -458,7 +460,8 @@ exports.PiData = Montage.create( Montage, { id: "stroke", label: "Stroke", labelField: "_name", - items : { boundObject: "this.application.ninja.appModel", boundProperty: "materials" } + items : { boundObject: "this.application.ninja.appModel", boundProperty: "materials" }, + enabled: { boundObject: "this.controls", boundProperty: "useWebGl" } } ] ] @@ -543,6 +546,7 @@ exports.PiData = Montage.create( Montage, { label: "Stroke", labelFunction: function(item) { return item.getName(); }, items : { boundObject: "this.application.ninja.appModel", boundProperty: "materials" }, + enabled: { boundObject: "this.controls", boundProperty: "useWebGl" }, divider : true } ], @@ -553,7 +557,8 @@ exports.PiData = Montage.create( Montage, { prop: "fillMaterial", label: "Fill", labelField: "_name", - items : { boundObject: "this.application.ninja.appModel", boundProperty: "materials" } + items : { boundObject: "this.application.ninja.appModel", boundProperty: "materials" }, + enabled: { boundObject: "this.controls", boundProperty: "useWebGl" } } ] ] -- cgit v1.2.3 From 486842239c71e7964f38a09aacda4970f2a82e1a Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Tue, 7 Feb 2012 10:58:14 -0800 Subject: Updated tools and PI to get/set materials by binding to appModel's materials property. This requires us to add FlatMaterial to the list of materials in the MaterialsLibrary. 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 901ca37f..de192b57 100644 --- a/js/data/pi/pi-data.js +++ b/js/data/pi/pi-data.js @@ -544,7 +544,7 @@ exports.PiData = Montage.create( Montage, { id: "strokeMaterial", prop: "strokeMaterial", label: "Stroke", - labelFunction: function(item) { return item.getName(); }, + labelField: "_name", items : { boundObject: "this.application.ninja.appModel", boundProperty: "materials" }, enabled: { boundObject: "this.controls", boundProperty: "useWebGl" }, divider : true -- cgit v1.2.3 From 8ad767b61460984a4031ba630f76ac8247a61857 Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Tue, 7 Feb 2012 11:42:10 -0800 Subject: Fixed PI to support WebGL materials. Signed-off-by: Nivesh Rajbhandari --- js/data/pi/pi-data.js | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'js/data') diff --git a/js/data/pi/pi-data.js b/js/data/pi/pi-data.js index de192b57..10b33a0e 100644 --- a/js/data/pi/pi-data.js +++ b/js/data/pi/pi-data.js @@ -384,6 +384,7 @@ exports.PiData = Montage.create( Montage, { prop: "strokeMaterial", label: "Stroke", labelField: "_name", + dataField: "_name", items : { boundObject: "this.application.ninja.appModel", boundProperty: "materials" }, enabled: { boundObject: "this.controls", boundProperty: "useWebGl" }, divider : true @@ -396,6 +397,7 @@ exports.PiData = Montage.create( Montage, { prop: "fillMaterial", label: "Fill", labelField: "_name", + dataField: "_name", items : { boundObject: "this.application.ninja.appModel", boundProperty: "materials" }, enabled: { boundObject: "this.controls", boundProperty: "useWebGl" } } @@ -460,6 +462,7 @@ exports.PiData = Montage.create( Montage, { id: "stroke", label: "Stroke", labelField: "_name", + dataField: "_name", items : { boundObject: "this.application.ninja.appModel", boundProperty: "materials" }, enabled: { boundObject: "this.controls", boundProperty: "useWebGl" } } @@ -545,6 +548,7 @@ exports.PiData = Montage.create( Montage, { prop: "strokeMaterial", label: "Stroke", labelField: "_name", + dataField: "_name", items : { boundObject: "this.application.ninja.appModel", boundProperty: "materials" }, enabled: { boundObject: "this.controls", boundProperty: "useWebGl" }, divider : true @@ -557,6 +561,7 @@ exports.PiData = Montage.create( Montage, { prop: "fillMaterial", label: "Fill", labelField: "_name", + dataField: "_name", items : { boundObject: "this.application.ninja.appModel", boundProperty: "materials" }, enabled: { boundObject: "this.controls", boundProperty: "useWebGl" } } -- cgit v1.2.3 From 9e40945a5bf4330d1088b56b8011ee625b1adab9 Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Fri, 10 Feb 2012 10:23:48 -0800 Subject: Support export/import of GLLine data. Signed-off-by: Nivesh Rajbhandari --- js/data/pi/pi-data.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'js/data') diff --git a/js/data/pi/pi-data.js b/js/data/pi/pi-data.js index 10b33a0e..8ffd0ec7 100644 --- a/js/data/pi/pi-data.js +++ b/js/data/pi/pi-data.js @@ -459,12 +459,14 @@ exports.PiData = Montage.create( Montage, { [ { type: "dropdown", - id: "stroke", + id: "strokeMaterial", + prop: "strokeMaterial", label: "Stroke", labelField: "_name", dataField: "_name", items : { boundObject: "this.application.ninja.appModel", boundProperty: "materials" }, - enabled: { boundObject: "this.controls", boundProperty: "useWebGl" } + enabled: { boundObject: "this.controls", boundProperty: "useWebGl" }, + divider : true } ] ] -- cgit v1.2.3 From cde1dd9a9156b9682fdf85ce2cd4acdd94124c37 Mon Sep 17 00:00:00 2001 From: John Mayhew Date: Fri, 10 Feb 2012 16:00:35 -0800 Subject: -Changed the capitalization of all main top level menus from all caps -Added new main-menu-controller to be the default generic handler for menu item calls that do not need to call to a specific controller -Removed the test menu item -Finalized the help submenu items and hooked them up to the main-menu-controller --- js/data/menu-data.js | 41 +++++++++++++++++------------------------ 1 file changed, 17 insertions(+), 24 deletions(-) (limited to 'js/data') diff --git a/js/data/menu-data.js b/js/data/menu-data.js index e9e47dc0..34adc82d 100644 --- a/js/data/menu-data.js +++ b/js/data/menu-data.js @@ -10,7 +10,7 @@ exports.MenuData = Montage.create( Montage, { topLevelMenu: { value: [ { - "header": "FILE", + "header": "File", "entries": [ { "displayText" : "New Project", @@ -71,7 +71,7 @@ exports.MenuData = Montage.create( Montage, { ] }, { - "header": "EDIT", + "header": "Edit", "entries": [ { "displayText" : "Undo", @@ -111,7 +111,7 @@ exports.MenuData = Montage.create( Montage, { ] }, { - "header": "VIEW", + "header": "View", "entries": [ { "displayText" : "Zoom In", @@ -282,7 +282,7 @@ exports.MenuData = Montage.create( Montage, { ] }, { - "header": "WINDOW", + "header": "Window", "entries": [ { "displayText" : "Tools", @@ -356,41 +356,34 @@ exports.MenuData = Montage.create( Montage, { ] }, { - "header": "HELP", + "header": "Help", "entries": [ { - "displayText" : "About", + "displayText" : "Ninja FAQ", "hasSubMenu" : false, - "enabled": true + "enabled": true, + "action": "executeHelpFAQ" }, { - "displayText" : "FAQ", + "displayText" : "Ninja Forums", "hasSubMenu" : false, - "enabled": true + "enabled": true, + "action": "executeHelpForums" }, { - "displayText" : "Forums", + "displayText" : "Help Topics", "hasSubMenu" : false, - "enabled": true - } - ] - }, - { - "header": "TEST", - "entries": [ - { - "displayText" : "Open CSS View", - "hasSubMenu" : false, - "enabled": true + "enabled": true, + "action": "executeHelpTopics" }, { - "displayText" : "Open JS View", + "displayText" : "About Ninja...", "hasSubMenu" : false, - "enabled": true + "enabled": true, + "action": "executeHelpAbout" } ] } - ] } }); -- cgit v1.2.3