Skip to content

Commit c00ccba

Browse files
committed
Move rawSpec pre-processing outside plot content pane.
1 parent 43ef4f8 commit c00ccba

File tree

4 files changed

+7
-10
lines changed

4 files changed

+7
-10
lines changed

plot-config-portable/src/commonMain/kotlin/jetbrains/datalore/plot/PlotHtmlExport.kt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,6 @@ object PlotHtmlExport {
8383

8484
return when {
8585
PlotConfig.isPlotSpec(plotSpec) -> {
86-
// val assembler = MonolithicCommon.createPlotAssembler(plotSpec) {
87-
// // ignore messages
88-
// }
89-
// PlotSizeHelper.singlePlotSize(plotSpec, plotSize, null, assembler.facets, assembler.containsLiveMap)
9086
val config = PlotConfigClientSide.create(plotSpec) { /*ignore messages*/ }
9187
PlotSizeHelper.singlePlotSize(
9288
plotSpec, plotSize, null,

vis-swing-batik/src/jvmMain/kotlin/jetbrains/datalore/vis/swing/batik/PlotViewerWindowBatik.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
package jetbrains.datalore.vis.swing.batik
77

8+
import jetbrains.datalore.plot.MonolithicCommon
89
import jetbrains.datalore.vis.swing.ApplicationContext
910
import jetbrains.datalore.vis.swing.DefaultPlotContentPane
1011
import jetbrains.datalore.vis.swing.PlotPanel
@@ -25,8 +26,9 @@ class PlotViewerWindowBatik(
2526
) {
2627

2728
override fun createWindowContent(preferredSizeFromPlot: Boolean): JComponent {
29+
val processedSpec = MonolithicCommon.processRawSpecs(rawSpec, frontendOnly = false)
2830
return object : DefaultPlotContentPane(
29-
rawSpec = rawSpec,
31+
processedSpec = processedSpec,
3032
preferredSizeFromPlot = preferredSizeFromPlot,
3133
repaintDelay = repaintDelay,
3234
applicationContext = applicationContext

vis-swing-common/src/jvmMain/kotlin/jetbrains/datalore/vis/swing/DefaultPlotContentPane.kt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
package jetbrains.datalore.vis.swing
77

88
import jetbrains.datalore.base.registration.Disposable
9-
import jetbrains.datalore.plot.MonolithicCommon
109
import java.awt.Color
1110
import java.awt.Component
1211
import javax.swing.BorderFactory
@@ -20,7 +19,7 @@ import javax.swing.JPanel
2019
* In IDEA plugin: inherit and implement 'com.intellij.openapi.Disposable'.
2120
*/
2221
abstract class DefaultPlotContentPane(
23-
rawSpec: MutableMap<String, Any>,
22+
processedSpec: MutableMap<String, Any>,
2423
private val preferredSizeFromPlot: Boolean,
2524
private val repaintDelay: Int, // ms
2625
private val applicationContext: ApplicationContext
@@ -29,8 +28,6 @@ abstract class DefaultPlotContentPane(
2928

3029
init {
3130
layout = BoxLayout(this, BoxLayout.Y_AXIS)
32-
33-
val processedSpec = MonolithicCommon.processRawSpecs(rawSpec, frontendOnly = false)
3431
createContent(processedSpec)
3532
}
3633

vis-swing-jfx/src/jvmMain/kotlin/jetbrains/datalore/vis/swing/jfx/PlotViewerWindowJfx.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
package jetbrains.datalore.vis.swing.jfx
77

8+
import jetbrains.datalore.plot.MonolithicCommon
89
import jetbrains.datalore.vis.swing.ApplicationContext
910
import jetbrains.datalore.vis.swing.DefaultPlotContentPane
1011
import jetbrains.datalore.vis.swing.PlotPanel
@@ -25,8 +26,9 @@ class PlotViewerWindowJfx(
2526
) {
2627

2728
override fun createWindowContent(preferredSizeFromPlot: Boolean): JComponent {
29+
val processedSpec = MonolithicCommon.processRawSpecs(rawSpec, frontendOnly = false)
2830
return object : DefaultPlotContentPane(
29-
rawSpec = rawSpec,
31+
processedSpec = processedSpec,
3032
preferredSizeFromPlot = preferredSizeFromPlot,
3133
repaintDelay = repaintDelay,
3234
applicationContext = applicationContext

0 commit comments

Comments
 (0)