Fixed vertical size for demos

This commit is contained in:
Alexander Nozik 2021-06-30 18:33:46 +03:00
parent 230cd5dc61
commit a583030c1c
3 changed files with 4 additions and 3 deletions

View File

@ -1,10 +1,10 @@
import space.kscience.dataforge.misc.DFExperimental
import space.kscience.visionforge.plotly.PlotlyPlugin
import space.kscience.visionforge.ring.ThreeWithControlsPlugin
import space.kscience.visionforge.runVisionClient
import space.kscience.visionforge.solid.three.ThreePlugin
@DFExperimental
fun main() = runVisionClient {
plugin(PlotlyPlugin)
plugin(ThreePlugin)
plugin(ThreeWithControlsPlugin)
}

View File

@ -95,6 +95,7 @@ public val ThreeCanvasWithControls: FunctionalComponent<ThreeCanvasWithControlsP
flexRow {
css {
height = 100.pct
flex(1.0, 1.0, FlexBasis.auto)
flexWrap = FlexWrap.wrap
alignItems = Align.stretch

View File

@ -131,7 +131,7 @@ public class ThreePlugin : AbstractPlugin(), ElementVisionRenderer {
override fun rateVision(vision: Vision): Int =
if (vision is Solid) ElementVisionRenderer.DEFAULT_RATING else ElementVisionRenderer.ZERO_RATING
fun renderSolid(
internal fun renderSolid(
element: Element,
vision: Solid,
): ThreeCanvas = getOrCreateCanvas(element).apply {