mirror of
https://github.com/dataarts/dat.gui.git
synced 2024-12-12 04:08:27 +00:00
Make it possible to override localStorage namespace, falling back to the old bad default for now
This commit is contained in:
parent
794427af09
commit
a7751512ff
@ -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');
|
||||
|
@ -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');
|
||||
|
Loading…
Reference in New Issue
Block a user