From 9ccb0d6e22effd68675bf310da9e601df0fa00a3 Mon Sep 17 00:00:00 2001 From: Robert Konigsberg Date: Fri, 28 Dec 2012 21:05:32 -0500 Subject: [PATCH] Be array friendly. --- experimental/palette/options.js | 4 ++-- experimental/palette/palette.js | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/experimental/palette/options.js b/experimental/palette/options.js index c26e990..7d15670 100644 --- a/experimental/palette/options.js +++ b/experimental/palette/options.js @@ -278,11 +278,11 @@ var opts = { scope : [ "global", "series", "y", "y2" ] }, strokePattern : { - type : "array", + type : "array", scope : [ "global", "series", "y", "y2" ] }, strokeWidth : { - type : "integer", + type : "float", scope : [ "global", "series", "y", "y2" ] }, timingName : { diff --git a/experimental/palette/palette.js b/experimental/palette/palette.js index b61f0d9..9e4139f 100644 --- a/experimental/palette/palette.js +++ b/experimental/palette/palette.js @@ -203,6 +203,8 @@ Palette.prototype.read = function() { results[opt] = Palette.parseFloatArray(value); } else if (type == "array") { results[opt] = Palette.parseBooleanArray(value); + } else if (type == "array") { + results[opt] = Palette.parseIntArray(value); } else if (type == "array") { results[opt] = Palette.parseIntArray(value); } else if (isFunction) { @@ -243,7 +245,7 @@ Palette.prototype.write = function(hash) { input.textContent = value ? "defined" : "not defined"; this.model[opt].functionString = value ? value.toString() : null; } else { - if (value) { + if (value != undefined) { input.value = value; } } -- 2.7.4