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 --- .../ink-bottle-properties.reel/ink-bottle-properties.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'js/components/tools-properties/ink-bottle-properties.reel/ink-bottle-properties.js') diff --git a/js/components/tools-properties/ink-bottle-properties.reel/ink-bottle-properties.js b/js/components/tools-properties/ink-bottle-properties.reel/ink-bottle-properties.js index 61ea808a..e3ffc359 100644 --- a/js/components/tools-properties/ink-bottle-properties.reel/ink-bottle-properties.js +++ b/js/components/tools-properties/ink-bottle-properties.reel/ink-bottle-properties.js @@ -14,7 +14,11 @@ exports.InkBottleProperties = Montage.create(ToolProperties, { _subPrepare: { value: function() { - ShapesController.DisplayMaterials(this._strokeMaterial); + Object.defineBinding(this._strokeMaterial, "items", { + boundObject: this.application.ninja.appModel, + boundObjectPropertyPath: "materials", + oneway: false + }); this.handleChange(null); this._useWebGL.addEventListener("change", this, false); -- cgit v1.2.3