Merge remote-tracking branch 'genrich/patch-1'

This commit is contained in:
Tomas Korcak 2015-08-14 15:48:40 +02:00
commit f93d49b207
4 changed files with 73 additions and 58 deletions

View File

@ -42,6 +42,7 @@ This will create a namespaced, unminified build of dat.GUI at `build/dat.gui.mai
* Using common.js * Using common.js
* Using webpack for build * Using webpack for build
* Fixed an issue with colors based on arrays - https://github.com/dataarts/dat.gui/pull/57 * Fixed an issue with colors based on arrays - https://github.com/dataarts/dat.gui/pull/57
* Update factory.js, Step param was not used - https://github.com/dataarts/dat.gui/pull/45
### 0.5 ### 0.5
* Moved to requirejs for dependency management. * Moved to requirejs for dependency management.

View File

@ -4223,13 +4223,19 @@ return /******/ (function(modules) { // webpackBootstrap
if (common.isNumber(initialValue)) { if (common.isNumber(initialValue)) {
if (common.isNumber(arguments[2]) && common.isNumber(arguments[3])) { if (common.isNumber(arguments[2]) && common.isNumber(arguments[3])) {
// Has min and max. // 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]); return new NumberControllerSlider(object, property, arguments[2], arguments[3]);
} else { } else {
return new NumberControllerBox(object, property, {min: arguments[2], max: arguments[3]}); return new NumberControllerBox(object, property, {min: arguments[2], max: arguments[3]});
} }
} }
if (common.isString(initialValue)) { if (common.isString(initialValue)) {
@ -4243,6 +4249,7 @@ return /******/ (function(modules) { // webpackBootstrap
if (common.isBoolean(initialValue)) { if (common.isBoolean(initialValue)) {
return new BooleanController(object, property); return new BooleanController(object, property);
} }
}; };
/***/ }, /***/ },

File diff suppressed because one or more lines are too long

View File

@ -33,13 +33,19 @@ var OptionController = require('./OptionController'),
if (common.isNumber(initialValue)) { if (common.isNumber(initialValue)) {
if (common.isNumber(arguments[2]) && common.isNumber(arguments[3])) { if (common.isNumber(arguments[2]) && common.isNumber(arguments[3])) {
// Has min and max. // 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]); return new NumberControllerSlider(object, property, arguments[2], arguments[3]);
} else { } else {
return new NumberControllerBox(object, property, {min: arguments[2], max: arguments[3]}); return new NumberControllerBox(object, property, {min: arguments[2], max: arguments[3]});
} }
} }
if (common.isString(initialValue)) { if (common.isString(initialValue)) {
@ -53,4 +59,5 @@ var OptionController = require('./OptionController'),
if (common.isBoolean(initialValue)) { if (common.isBoolean(initialValue)) {
return new BooleanController(object, property); return new BooleanController(object, property);
} }
}; };