forked from kscience/visionforge
Update kotlin and DF
This commit is contained in:
parent
9eb5def13c
commit
b40c1d0025
@ -4,7 +4,7 @@ plugins {
|
|||||||
// kotlin("js") version "1.5.30" apply false
|
// kotlin("js") version "1.5.30" apply false
|
||||||
}
|
}
|
||||||
|
|
||||||
val dataforgeVersion by extra("0.5.1")
|
val dataforgeVersion by extra("0.5.2-dev-2")
|
||||||
val fxVersion by extra("11")
|
val fxVersion by extra("11")
|
||||||
|
|
||||||
allprojects {
|
allprojects {
|
||||||
@ -16,7 +16,7 @@ allprojects {
|
|||||||
}
|
}
|
||||||
|
|
||||||
group = "space.kscience"
|
group = "space.kscience"
|
||||||
version = "0.2.0-dev-24"
|
version = "0.2.0-dev-25"
|
||||||
}
|
}
|
||||||
|
|
||||||
subprojects {
|
subprojects {
|
||||||
|
@ -40,7 +40,6 @@ fun main() {
|
|||||||
println(it)
|
println(it)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
val solid = geo.toSolid()
|
val solid = geo.toSolid()
|
||||||
|
|
||||||
Paths.get("BM@N.vf.json").writeText(Solids.encodeToString(solid))
|
Paths.get("BM@N.vf.json").writeText(Solids.encodeToString(solid))
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
pluginManagement {
|
pluginManagement {
|
||||||
|
|
||||||
val toolsVersion = "0.10.3"
|
val toolsVersion = "0.10.7"
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
//mavenLocal()
|
//mavenLocal()
|
||||||
|
@ -10,8 +10,8 @@ import org.w3c.dom.events.Event
|
|||||||
import org.w3c.files.Blob
|
import org.w3c.files.Blob
|
||||||
import org.w3c.files.BlobPropertyBag
|
import org.w3c.files.BlobPropertyBag
|
||||||
import react.FunctionComponent
|
import react.FunctionComponent
|
||||||
|
import react.Props
|
||||||
import react.RBuilder
|
import react.RBuilder
|
||||||
import react.RProps
|
|
||||||
import react.dom.attrs
|
import react.dom.attrs
|
||||||
import react.dom.button
|
import react.dom.button
|
||||||
import react.functionComponent
|
import react.functionComponent
|
||||||
@ -42,7 +42,7 @@ public fun RBuilder.canvasControls(canvasOptions: Canvas3DOptions, vision: Visio
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public external interface CanvasControlsProps : RProps {
|
public external interface CanvasControlsProps : Props {
|
||||||
public var canvasOptions: Canvas3DOptions
|
public var canvasOptions: Canvas3DOptions
|
||||||
public var vision: Vision?
|
public var vision: Vision?
|
||||||
}
|
}
|
||||||
@ -54,7 +54,7 @@ public val CanvasControls: FunctionComponent<CanvasControlsProps> = functionComp
|
|||||||
border(1.px, BorderStyle.solid, Color.blue)
|
border(1.px, BorderStyle.solid, Color.blue)
|
||||||
padding(4.px)
|
padding(4.px)
|
||||||
}
|
}
|
||||||
props.vision?.let{ vision ->
|
props.vision?.let { vision ->
|
||||||
button {
|
button {
|
||||||
+"Export"
|
+"Export"
|
||||||
attrs {
|
attrs {
|
||||||
|
@ -3,8 +3,8 @@ package space.kscience.visionforge.bootstrap
|
|||||||
import kotlinx.css.*
|
import kotlinx.css.*
|
||||||
import kotlinx.css.properties.border
|
import kotlinx.css.properties.border
|
||||||
import react.FunctionComponent
|
import react.FunctionComponent
|
||||||
|
import react.PropsWithChildren
|
||||||
import react.RBuilder
|
import react.RBuilder
|
||||||
import react.RProps
|
|
||||||
import react.dom.h2
|
import react.dom.h2
|
||||||
import react.functionComponent
|
import react.functionComponent
|
||||||
import space.kscience.dataforge.names.Name
|
import space.kscience.dataforge.names.Name
|
||||||
@ -16,7 +16,7 @@ import space.kscience.visionforge.solid.specifications.Canvas3DOptions
|
|||||||
import styled.css
|
import styled.css
|
||||||
import styled.styledDiv
|
import styled.styledDiv
|
||||||
|
|
||||||
public external interface ThreeControlsProps : RProps {
|
public external interface ThreeControlsProps : PropsWithChildren {
|
||||||
public var canvasOptions: Canvas3DOptions
|
public var canvasOptions: Canvas3DOptions
|
||||||
public var vision: Vision?
|
public var vision: Vision?
|
||||||
public var selected: Name?
|
public var selected: Name?
|
||||||
|
@ -20,7 +20,7 @@ import styled.css
|
|||||||
import styled.styledDiv
|
import styled.styledDiv
|
||||||
import styled.styledSpan
|
import styled.styledSpan
|
||||||
|
|
||||||
public external interface MetaViewerProps : RProps {
|
public external interface MetaViewerProps : Props {
|
||||||
/**
|
/**
|
||||||
* Root meta
|
* Root meta
|
||||||
*/
|
*/
|
||||||
|
@ -19,7 +19,7 @@ import styled.styledButton
|
|||||||
import styled.styledDiv
|
import styled.styledDiv
|
||||||
import styled.styledSpan
|
import styled.styledSpan
|
||||||
|
|
||||||
public external interface PropertyEditorProps : RProps {
|
public external interface PropertyEditorProps : Props {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Root config object - always non-null
|
* Root config object - always non-null
|
||||||
|
@ -14,7 +14,7 @@ import space.kscience.visionforge.solid.three.ThreePlugin
|
|||||||
import styled.css
|
import styled.css
|
||||||
import styled.styledDiv
|
import styled.styledDiv
|
||||||
|
|
||||||
public external interface ThreeCanvasProps : RProps {
|
public external interface ThreeCanvasProps : Props {
|
||||||
public var context: Context
|
public var context: Context
|
||||||
public var options: Canvas3DOptions?
|
public var options: Canvas3DOptions?
|
||||||
public var solid: Solid?
|
public var solid: Solid?
|
||||||
|
@ -21,7 +21,7 @@ import styled.css
|
|||||||
import styled.styledDiv
|
import styled.styledDiv
|
||||||
import styled.styledSpan
|
import styled.styledSpan
|
||||||
|
|
||||||
public external interface ObjectTreeProps : RProps {
|
public external interface ObjectTreeProps : Props {
|
||||||
public var name: Name
|
public var name: Name
|
||||||
public var selected: Name?
|
public var selected: Name?
|
||||||
public var obj: Vision
|
public var obj: Vision
|
||||||
|
@ -11,7 +11,7 @@ import org.w3c.dom.HTMLInputElement
|
|||||||
import org.w3c.dom.HTMLSelectElement
|
import org.w3c.dom.HTMLSelectElement
|
||||||
import org.w3c.dom.events.Event
|
import org.w3c.dom.events.Event
|
||||||
import react.FunctionComponent
|
import react.FunctionComponent
|
||||||
import react.RProps
|
import react.Props
|
||||||
import react.dom.attrs
|
import react.dom.attrs
|
||||||
import react.dom.option
|
import react.dom.option
|
||||||
import react.functionComponent
|
import react.functionComponent
|
||||||
@ -29,7 +29,7 @@ import styled.css
|
|||||||
import styled.styledInput
|
import styled.styledInput
|
||||||
import styled.styledSelect
|
import styled.styledSelect
|
||||||
|
|
||||||
public external interface ValueChooserProps : RProps {
|
public external interface ValueChooserProps : Props {
|
||||||
public var descriptor: MetaDescriptor?
|
public var descriptor: MetaDescriptor?
|
||||||
public var meta: ObservableMutableMeta
|
public var meta: ObservableMutableMeta
|
||||||
public var actual: Meta
|
public var actual: Meta
|
||||||
|
@ -24,7 +24,7 @@ import space.kscience.visionforge.solid.specifications.Canvas3DOptions
|
|||||||
import styled.css
|
import styled.css
|
||||||
import styled.styledDiv
|
import styled.styledDiv
|
||||||
|
|
||||||
public external interface ThreeCanvasWithControlsProps : RProps {
|
public external interface ThreeCanvasWithControlsProps : Props {
|
||||||
public var context: Context
|
public var context: Context
|
||||||
public var builderOfSolid: Deferred<Solid?>
|
public var builderOfSolid: Deferred<Solid?>
|
||||||
public var selected: Name?
|
public var selected: Name?
|
||||||
|
@ -10,8 +10,8 @@ import org.w3c.dom.events.Event
|
|||||||
import org.w3c.files.Blob
|
import org.w3c.files.Blob
|
||||||
import org.w3c.files.BlobPropertyBag
|
import org.w3c.files.BlobPropertyBag
|
||||||
import react.FunctionComponent
|
import react.FunctionComponent
|
||||||
|
import react.Props
|
||||||
import react.RBuilder
|
import react.RBuilder
|
||||||
import react.RProps
|
|
||||||
import react.dom.attrs
|
import react.dom.attrs
|
||||||
import react.dom.button
|
import react.dom.button
|
||||||
import react.functionComponent
|
import react.functionComponent
|
||||||
@ -47,7 +47,7 @@ internal fun RBuilder.canvasControls(options: Canvas3DOptions, vision: Vision?):
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
internal external interface CanvasControlsProps : RProps {
|
internal external interface CanvasControlsProps : Props {
|
||||||
public var options: Canvas3DOptions
|
public var options: Canvas3DOptions
|
||||||
public var vision: Vision?
|
public var vision: Vision?
|
||||||
}
|
}
|
||||||
@ -85,7 +85,7 @@ internal val CanvasControls: FunctionComponent<CanvasControlsProps> = functionCo
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public external interface ThreeControlsProps : RProps {
|
public external interface ThreeControlsProps : Props {
|
||||||
public var canvasOptions: Canvas3DOptions
|
public var canvasOptions: Canvas3DOptions
|
||||||
public var vision: Vision?
|
public var vision: Vision?
|
||||||
public var selected: Name?
|
public var selected: Name?
|
||||||
|
@ -339,6 +339,7 @@ private class GdmlLoader(val settings: GdmlLoaderOptions) {
|
|||||||
when (val vol: GdmlPlacement? = group.placement) {
|
when (val vol: GdmlPlacement? = group.placement) {
|
||||||
is GdmlPhysVolume -> addPhysicalVolume(root, vol)
|
is GdmlPhysVolume -> addPhysicalVolume(root, vol)
|
||||||
is GdmlDivisionVolume -> addDivisionVolume(root, vol)
|
is GdmlDivisionVolume -> addDivisionVolume(root, vol)
|
||||||
|
else -> {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -65,7 +65,7 @@ public fun SolidGroup.smartComposite(
|
|||||||
val group = SolidGroup(builder)
|
val group = SolidGroup(builder)
|
||||||
if (name == null && group.meta.isEmpty()) {
|
if (name == null && group.meta.isEmpty()) {
|
||||||
//append directly to group if no properties are defined
|
//append directly to group if no properties are defined
|
||||||
group.children.forEach { (key, value) ->
|
group.children.forEach { (_, value) ->
|
||||||
value.parent = null
|
value.parent = null
|
||||||
set(null, value)
|
set(null, value)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user