Fix folder renaming. (fixes #196)

This commit is contained in:
Don McCurdy 2018-10-06 21:46:06 -07:00
parent 642af145fd
commit df80c663f8

View File

@ -177,6 +177,7 @@ const GUI = function(pars) {
localStorage.getItem(getLocalStorageHash(this, 'isLocal')) === 'true'; localStorage.getItem(getLocalStorageHash(this, 'isLocal')) === 'true';
let saveToLocalStorage; let saveToLocalStorage;
let titleRow;
Object.defineProperties(this, Object.defineProperties(this,
/** @lends GUI.prototype */ /** @lends GUI.prototype */
@ -267,8 +268,8 @@ const GUI = function(pars) {
set: function(v) { set: function(v) {
// TODO Check for collisions among sibling folders // TODO Check for collisions among sibling folders
params.name = v; params.name = v;
if (titleRowName) { if (titleRow) {
titleRowName.innerHTML = params.name; titleRow.innerHTML = params.name;
} }
} }
}, },
@ -376,7 +377,7 @@ const GUI = function(pars) {
const titleRowName = document.createTextNode(params.name); const titleRowName = document.createTextNode(params.name);
dom.addClass(titleRowName, 'controller-name'); dom.addClass(titleRowName, 'controller-name');
const titleRow = addRow(_this, titleRowName); titleRow = addRow(_this, titleRowName);
const onClickTitle = function(e) { const onClickTitle = function(e) {
e.preventDefault(); e.preventDefault();