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) {
|
function getLocalStorageHash(gui, key) {
|
||||||
// TODO how does this deal with multiple GUI's?
|
var namespace = localStorage.getItem('dat.gui.namespace') || document.location.href;
|
||||||
return document.location.href + '.' + key;
|
return 'dat.gui.' + namespace + '.' + key;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function addSaveMenu(gui) {
|
function addSaveMenu(gui) {
|
||||||
|
|
||||||
var div = gui.__save_row = document.createElement('li');
|
var div = gui.__save_row = document.createElement('li');
|
||||||
|
@ -1109,11 +1109,11 @@ define([
|
|||||||
}
|
}
|
||||||
|
|
||||||
function getLocalStorageHash(gui, key) {
|
function getLocalStorageHash(gui, key) {
|
||||||
// TODO how does this deal with multiple GUI's?
|
var namespace = localStorage.getItem('dat.gui.namespace') || document.location.href;
|
||||||
return document.location.href + '.' + key;
|
return 'dat.gui.' + namespace + '.' + key;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function addSaveMenu(gui) {
|
function addSaveMenu(gui) {
|
||||||
|
|
||||||
var div = gui.__save_row = document.createElement('li');
|
var div = gui.__save_row = document.createElement('li');
|
||||||
|
Loading…
Reference in New Issue
Block a user