Merge branch 'jaxry-master' into develop

# Conflicts:
#	src/dat/gui/GUI.js
This commit is contained in:
Jeff Nusz 2016-08-17 13:17:46 -07:00
commit 6322ce6cd0

View File

@ -743,7 +743,7 @@ function addRow(gui, newDom, liBefore) {
} }
if (liBefore) { if (liBefore) {
gui.__ul.insertBefore(li, params.before); gui.__ul.insertBefore(li, liBefore);
} else { } else {
gui.__ul.appendChild(li); gui.__ul.appendChild(li);
} }
@ -769,6 +769,7 @@ function augmentController(gui, li, controller) {
common.extend(controller, { common.extend(controller, {
options: function(options) { options: function(options) {
if (arguments.length > 1) { if (arguments.length > 1) {
const nextSibling = controller.__li.nextElementSibling;
controller.remove(); controller.remove();
return add( return add(
@ -776,13 +777,14 @@ function augmentController(gui, li, controller) {
controller.object, controller.object,
controller.property, controller.property,
{ {
before: controller.__li.nextElementSibling, before: nextSibling,
factoryArgs: [common.toArray(arguments)] factoryArgs: [common.toArray(arguments)]
} }
); );
} }
if (common.isArray(options) || common.isObject(options)) { if (common.isArray(options) || common.isObject(options)) {
const nextSibling = controller.__li.nextElementSibling;
controller.remove(); controller.remove();
return add( return add(
@ -790,7 +792,7 @@ function augmentController(gui, li, controller) {
controller.object, controller.object,
controller.property, controller.property,
{ {
before: controller.__li.nextElementSibling, before: nextSibling,
factoryArgs: [options] factoryArgs: [options]
} }
); );