added remember option to playground

This commit is contained in:
javi 2013-09-30 16:39:44 +02:00
parent d8ba6c897e
commit e8c2d4d85f

View File

@ -169,15 +169,17 @@
ui = null;
}
ui = new dat.GUI();
ui.remember(TorqueOptions);
ui.add(TorqueOptions, 'user')
ui.add(TorqueOptions, 'table')
ui.add(TorqueOptions, 'column')
ui.add(TorqueOptions, 'is_time')
ui.add(TorqueOptions, 'countby')
ui.add(TorqueOptions, 'resolution', [1, 2, 4, 8, 16, 32])
ui.add(TorqueOptions, 'steps', 10, 1024).listen()
ui.add(TorqueOptions, 'animationDuration', 5, 120);
ui.add({ cartocss_editor: toggle_editor }, 'cartocss_editor');
ui.remember(TorqueOptions);
//ui.remember(TorqueOptions);
//ui.add(TorqueOptions, 'blendmode', blend_modes);
ui.add({
update: function() {
@ -196,7 +198,7 @@
textarea.value = DEFAULT_CARTOCSS;
editor = CodeMirror.fromTextArea(textarea, { mode: "text/css" });
editor.on('change', _.debounce(function() {
torqueLayer.setCartoCSS(editor.getValue());
window.torqueLayer.setCartoCSS(editor.getValue());
}, 250))
}
editor