From d44f3196c925332dcaf45f7cf8c64e22a1994bb9 Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Mon, 4 Jun 2012 17:11:06 -0700 Subject: Fill and Ink-Bottle fixes. Signed-off-by: Nivesh Rajbhandari --- .../ink-bottle-properties.js | 28 ++++++---------------- 1 file changed, 7 insertions(+), 21 deletions(-) (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 945df857..7affe581 100755 --- 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 @@ -28,7 +28,7 @@ var InkBottleProperties = exports.InkBottleProperties = Montage.create(ToolPrope } }, - draw: { + draw: { enumerable: false, value: function () { Object.getPrototypeOf(InkBottleProperties).draw.call(this); @@ -58,7 +58,7 @@ var InkBottleProperties = exports.InkBottleProperties = Montage.create(ToolPrope _subPrepare: { value: function() { - Object.defineBinding(this._strokeMaterial, "items", { + Object.defineBinding(this.strokeMaterial, "items", { boundObject: this.application.ninja.appModel, boundObjectPropertyPath: "materials", oneway: false @@ -72,33 +72,19 @@ var InkBottleProperties = exports.InkBottleProperties = Montage.create(ToolPrope val = event.currentTarget.identifier; switch(val) { case "useBorderWidth": - if(ch.checked) { - this.borderWidthLabel.element.classList.remove("disabled"); - this._borderWidth.enabled = true; - } else { - this.borderWidthLabel.element.classList.add("disabled"); - this._borderWidth.enabled = false; - } + this.borderWidth.enabled = ch.checked; break; case "useBorderStyle": if(ch.checked) { - this.borderStyleLabel.element.classList.remove("disabled"); - this._borderStyle.removeAttribute("disabled") + this.borderStyle.removeAttribute("disabled"); } else { - this.borderStyleLabel.element.classList.add("disabled"); - this._borderStyle.setAttribute("disabled", "disabled"); + this.borderStyle.setAttribute("disabled", "disabled"); } break; case "useStrokeSize": - if(ch.checked) { - this.strokeSizeLabel.element.classList.remove("disabled"); - this._strokeSize.enabled = true - } else { - this.strokeSizeLabel.element.classList.add("disabled"); - this._strokeSize.enabled = false; - } + this.strokeSize.enabled = ch.checked; break; - case "useWebGl": + case "useWebGL": (ch.checked) ? this._materialsContainer.style["display"] = "" : this._materialsContainer.style["display"] = "none"; break; } -- cgit v1.2.3