From c78775aa2aaf76f9fa1404ff32a10fb8227f380e Mon Sep 17 00:00:00 2001 From: Robert Jaros Date: Fri, 25 Oct 2019 20:46:42 +0200 Subject: Style fixes --- .../src/main/kotlin/pl/treksoft/kvision/chart/Chart.kt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'kvision-modules/kvision-chart/src/main') diff --git a/kvision-modules/kvision-chart/src/main/kotlin/pl/treksoft/kvision/chart/Chart.kt b/kvision-modules/kvision-chart/src/main/kotlin/pl/treksoft/kvision/chart/Chart.kt index 29cc80c2..55718918 100644 --- a/kvision-modules/kvision-chart/src/main/kotlin/pl/treksoft/kvision/chart/Chart.kt +++ b/kvision-modules/kvision-chart/src/main/kotlin/pl/treksoft/kvision/chart/Chart.kt @@ -23,6 +23,7 @@ package pl.treksoft.kvision.chart import com.github.snabbdom.VNode import pl.treksoft.kvision.chart.js.Chart.ChartConfiguration +import pl.treksoft.kvision.chart.js.PluginServiceGlobalRegistration import pl.treksoft.kvision.chart.js.Chart as JsChart import pl.treksoft.kvision.core.Container import pl.treksoft.kvision.core.Widget @@ -112,11 +113,13 @@ open class Chart( companion object { fun registerPlugin(plugin: dynamic) { - JsChart.plugins.register(plugin) + @Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE") + JsChart.plugins.register(plugin as PluginServiceGlobalRegistration) } fun unregisterPlugin(plugin: dynamic) { - JsChart.plugins.unregister(plugin) + @Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE") + JsChart.plugins.unregister(plugin as PluginServiceGlobalRegistration) } } } -- cgit