Published unlisted
Edited
Jun 12, 2019
Insert cell
Changed in fork
-
md`# Observable and dat.gui issues`
+
md`# Observable and dat.gui issues See https://talk.observablehq.com/t/before-content-for-li-element-affect-dat-gui-hoste-in-observable-notebook-cell/2050`
Insert cell
Changed in fork
-
html`<div id="guiDiv" style="height:100px;"></div>`
+
guiDiv = html`<div id="guiDiv" style="height:100px;"></div>`
Insert cell
Insert cell
Insert cell
Removed in parent
html`<style>
.dg ul li:before {
content: none;
}`
Insert cell
Changed in fork
{ var guiDisplay = {"Show Hidden": false }; var datGui = new dat.GUI();
-
document.getElementById("guiDiv").appendChild(datGui.domElement);
+
while (guiDiv.firstChild) { guiDiv.removeChild(guiDiv.firstChild); } guiDiv.appendChild(datGui.domElement);
datGui.add(guiDisplay, 'Show Hidden'); }
Insert cell
//dat.gui
dat = require('dat.gui')
Insert cell