From 134cb687c4e05fd81a03b682505f9fb9d741a8d7 Mon Sep 17 00:00:00 2001 From: Robert Jaros Date: Sat, 9 May 2020 23:53:57 +0200 Subject: Add new className parameter to all DSL builder functions. --- .../kvision-maps/src/main/kotlin/pl/treksoft/kvision/maps/Maps.kt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'kvision-modules/kvision-maps/src/main/kotlin/pl/treksoft/kvision/maps') diff --git a/kvision-modules/kvision-maps/src/main/kotlin/pl/treksoft/kvision/maps/Maps.kt b/kvision-modules/kvision-maps/src/main/kotlin/pl/treksoft/kvision/maps/Maps.kt index cb98fb8a..b76300c8 100644 --- a/kvision-modules/kvision-maps/src/main/kotlin/pl/treksoft/kvision/maps/Maps.kt +++ b/kvision-modules/kvision-maps/src/main/kotlin/pl/treksoft/kvision/maps/Maps.kt @@ -27,6 +27,7 @@ import pl.treksoft.kvision.KVManagerMaps import pl.treksoft.kvision.core.Container import pl.treksoft.kvision.core.Widget import pl.treksoft.kvision.utils.obj +import pl.treksoft.kvision.utils.set /** * Maps component. @@ -90,10 +91,11 @@ fun Container.maps( lng: Number, zoom: Number, showMarker: Boolean = false, - classes: Set = setOf(), + classes: Set? = null, + className: String? = null, init: (Maps.() -> Unit)? = null ): Maps { - val maps = Maps(lat, lng, zoom, showMarker, classes, init) + val maps = Maps(lat, lng, zoom, showMarker, classes ?: className.set, init) this.add(maps) return maps } -- cgit