diff --git a/build/dat.gui.js b/build/dat.gui.js index bbfcea4..f2731fc 100644 --- a/build/dat.gui.js +++ b/build/dat.gui.js @@ -2604,11 +2604,11 @@ dat.GUI = dat.gui.GUI = (function (css, saveDialogueContents, styleSheet, contro } function getLocalStorageHash(gui, key) { - // TODO how does this deal with multiple GUI's? - return document.location.href + '.' + key; - + var namespace = localStorage.getItem('dat.gui.namespace') || document.location.href; + return 'dat.gui.' + namespace + '.' + key; } + function addSaveMenu(gui) { var div = gui.__save_row = document.createElement('li'); diff --git a/src/dat/gui/GUI.js b/src/dat/gui/GUI.js index d06d8e9..ec544e3 100644 --- a/src/dat/gui/GUI.js +++ b/src/dat/gui/GUI.js @@ -1109,11 +1109,11 @@ define([ } function getLocalStorageHash(gui, key) { - // TODO how does this deal with multiple GUI's? - return document.location.href + '.' + key; - + var namespace = localStorage.getItem('dat.gui.namespace') || document.location.href; + return 'dat.gui.' + namespace + '.' + key; } + function addSaveMenu(gui) { var div = gui.__save_row = document.createElement('li');