Gunslingor
03/23/2020, 4:59 PMdocument.body?.appendChild(renderer.domElement)
While this doesn't?
val target = document.getElementById("right_pane")?
target?.appendChild(renderer.domElement)
document.body? is an Element and document.body? is an HTML element.... not sure why there are two but there has to be a converter or something... or someway to make this work. Elements seems to allow appending a string as HTML via innerHTML while HTMLElements seem to do something with Nodes... don't really get this, feels like object interfaces aren't formalized.araqnid
03/23/2020, 6:26 PMval domElement = document.create.div {
p { }
}
document.body?.appendChild(domElement)
document.getElementById("xxx")?.appendChild(domElement)
Gunslingor
03/23/2020, 6:29 PMdocument.getElementById("right_pane")?.apply {
appendElement("div") {
innerHTML = ProjectionToolbar().view
}
appendChild(viewer.renderer.domElement)
}