From 303cb10e0715fc41314da1f20b9758f18d7b46d9 Mon Sep 17 00:00:00 2001 From: Dennis Markgraf Date: Sat, 19 Jul 2014 13:51:57 +0200 Subject: [PATCH] fixes missing step argument step argument was not provided in factory.js --- src/dat/controllers/factory.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/dat/controllers/factory.js b/src/dat/controllers/factory.js index 897b267..0c10548 100644 --- a/src/dat/controllers/factory.js +++ b/src/dat/controllers/factory.js @@ -37,12 +37,18 @@ define([ if (common.isNumber(arguments[2]) && common.isNumber(arguments[3])) { - // Has min and max. - return new NumberControllerSlider(object, property, arguments[2], arguments[3]); + // Has min and max. + if (common.isNumber(arguments[4])) // has step + return new NumberControllerSlider(object, property, arguments[2], arguments[3], arguments[4]); + else + return new NumberControllerSlider(object, property, arguments[2], arguments[3]); } else { - return new NumberControllerBox(object, property, { min: arguments[2], max: arguments[3] }); + if (common.isNumber(arguments[4])) + return new NumberControllerBox(object, property, { min: arguments[2], max: arguments[3], step: arguments[4] }); + else + return new NumberControllerBox(object, property, { min: arguments[2], max: arguments[3] }); }