Minor fixes

This commit is contained in:
Alexander Nozik 2023-05-30 20:04:23 +03:00
parent be52551564
commit a872f10523
2 changed files with 4 additions and 1 deletions

View File

@ -92,6 +92,7 @@ public abstract class VisionTagConsumer<R>(
vision.setAsRoot(manager)
}
attributes[OUTPUT_NAME_ATTRIBUTE] = name.toString()
renderVision(manager, name, vision, outputMeta)
if (!outputMeta.isEmpty()) {
//Hard-code output configuration
script {
@ -102,7 +103,6 @@ public abstract class VisionTagConsumer<R>(
}
}
}
renderVision(manager, name, vision, outputMeta)
}
/**

View File

@ -14,6 +14,7 @@ import space.kscience.dataforge.misc.DFExperimental
import space.kscience.dataforge.names.Name
import space.kscience.plotly.Plot
import space.kscience.plotly.Plotly
import space.kscience.plotly.PlotlyConfig
import space.kscience.visionforge.MutableVisionProperties
import space.kscience.visionforge.Vision
import space.kscience.visionforge.VisionBuilder
@ -88,8 +89,10 @@ public fun Plot.asVision(): VisionOfPlotly = VisionOfPlotly(this)
*/
@VisionBuilder
public inline fun VisionOutput.plotly(
config: PlotlyConfig = PlotlyConfig(),
block: Plot.() -> Unit,
): VisionOfPlotly {
requirePlugin(PlotlyPlugin)
meta = config.meta
return VisionOfPlotly(Plotly.plot(block))
}