This is an automated email from the ASF dual-hosted git repository. joergrade pushed a commit to branch ISIS-3171 in repository https://gitbox.apache.org/repos/asf/isis.git
commit eedb93197d9067b0869b5f1975279af90ec7f78e Author: Jörg Rade <[email protected]> AuthorDate: Mon Aug 22 18:18:14 2022 +0200 ISIS-3043 Version upgrade: kvision=5.14, subtype nullable --- incubator/clients/kroviz/build.gradle.kts | 8 +++- incubator/clients/kroviz/gradle.properties | 2 +- .../kroviz/core/aggregator/ActionDispatcher.kt | 2 +- .../kroviz/core/aggregator/AggregatorWithLayout.kt | 2 +- .../kroviz/core/aggregator/BaseAggregator.kt | 2 +- .../kroviz/core/aggregator/CollectionAggregator.kt | 2 +- .../core/aggregator/DomainTypesAggregator.kt | 2 +- .../kroviz/core/aggregator/DownloadDispatcher.kt | 2 +- .../kroviz/core/aggregator/ErrorDispatcher.kt | 3 +- .../kroviz/core/aggregator/NavigationDispatcher.kt | 2 +- .../kroviz/core/aggregator/ObjectAggregator.kt | 2 +- .../kroviz/core/aggregator/RestfulDispatcher.kt | 2 +- .../client/kroviz/core/aggregator/SvgDispatcher.kt | 3 +- .../kroviz/core/aggregator/SystemAggregator.kt | 2 +- .../kroviz/core/aggregator/UndefinedDispatcher.kt | 2 +- .../isis/client/kroviz/core/event/LogEntry.kt | 2 +- .../isis/client/kroviz/core/event/ResourceProxy.kt | 13 ++++--- .../kroviz/core/event/ResourceSpecification.kt | 6 +-- .../client/kroviz/core/event/RoXmlHttpRequest.kt | 6 +-- .../apache/isis/client/kroviz/ui/panel/GeoMap.kt | 7 ++-- .../apache/isis/client/kroviz/ui/panel/SvgMap.kt | 45 ++++++++++++++++------ .../kroviz/core/aggregator/DispatchInterceptor.kt | 2 +- 22 files changed, 72 insertions(+), 47 deletions(-) diff --git a/incubator/clients/kroviz/build.gradle.kts b/incubator/clients/kroviz/build.gradle.kts index c4a35fdf48..40f3d44b85 100644 --- a/incubator/clients/kroviz/build.gradle.kts +++ b/incubator/clients/kroviz/build.gradle.kts @@ -80,11 +80,11 @@ kotlin { implementation("io.kvision:kvision-bootstrap:$kvisionVersion") implementation("io.kvision:kvision-bootstrap-css:$kvisionVersion") implementation("io.kvision:kvision-bootstrap-datetime:$kvisionVersion") + implementation("io.kvision:kvision-bootstrap-dialog:$kvisionVersion") implementation("io.kvision:kvision-bootstrap-select:$kvisionVersion") implementation("io.kvision:kvision-bootstrap-spinner:$kvisionVersion") - implementation("io.kvision:kvision-bootstrap-upload:$kvisionVersion") - implementation("io.kvision:kvision-bootstrap-dialog:$kvisionVersion") implementation("io.kvision:kvision-bootstrap-typeahead:$kvisionVersion") + implementation("io.kvision:kvision-bootstrap-upload:$kvisionVersion") implementation("io.kvision:kvision-fontawesome:$kvisionVersion") implementation("io.kvision:kvision-i18n:$kvisionVersion") implementation("io.kvision:kvision-richtext:$kvisionVersion") @@ -107,6 +107,10 @@ kotlin { implementation(npm("xml-beautify", "1.1.2", false)) implementation(npm("xterm", "4.15.0", false)) implementation(npm("pdfjs", "2.4.7", false)) + implementation(npm("vega", "5.22.1", false)) + implementation(npm("vega-lite", "5.4.0", false)) + implementation(npm("vega-lite-api", "5.0.0", true)) + implementation(npm("element-resize-event", "3.0.6", false)) } sourceSets["test"].dependencies { implementation(kotlin("test-js")) diff --git a/incubator/clients/kroviz/gradle.properties b/incubator/clients/kroviz/gradle.properties index 07251666a0..b67921e7dd 100644 --- a/incubator/clients/kroviz/gradle.properties +++ b/incubator/clients/kroviz/gradle.properties @@ -21,7 +21,7 @@ javaVersion=1.8 systemProp.kotlinVersion=1.6.10 serializationVersion=1.3.0 #Dependencies -systemProp.kvisionVersion=5.8.3 +systemProp.kvisionVersion=5.14.0 coroutinesVersion=1.5.2 kotlin.mpp.stability.nowarn=true diff --git a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/aggregator/ActionDispatcher.kt b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/aggregator/ActionDispatcher.kt index 91ab86ee6e..81bf9dc3c6 100644 --- a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/aggregator/ActionDispatcher.kt +++ b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/aggregator/ActionDispatcher.kt @@ -27,7 +27,7 @@ import org.apache.isis.client.kroviz.utils.StringUtils class ActionDispatcher(private val at: Point = Point(100, 100)) : BaseAggregator() { - override fun update(logEntry: LogEntry, subType: String) { + override fun update(logEntry: LogEntry, subType: String?) { val to = logEntry.getTransferObject() val referrer = logEntry.url when { diff --git a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/aggregator/AggregatorWithLayout.kt b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/aggregator/AggregatorWithLayout.kt index 81f504fbc8..72fd2fd291 100644 --- a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/aggregator/AggregatorWithLayout.kt +++ b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/aggregator/AggregatorWithLayout.kt @@ -32,7 +32,7 @@ abstract class AggregatorWithLayout : BaseAggregator() { var parentUrl: String? = null var tree: Tree? = null - override fun update(logEntry: LogEntry, subType: String) { + override fun update(logEntry: LogEntry, subType: String?) { parentUrl = logEntry.url } diff --git a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/aggregator/BaseAggregator.kt b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/aggregator/BaseAggregator.kt index f6d81ac2d2..135dc3f654 100644 --- a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/aggregator/BaseAggregator.kt +++ b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/aggregator/BaseAggregator.kt @@ -43,7 +43,7 @@ abstract class BaseAggregator { open lateinit var dpm: BaseDisplayModel - open fun update(logEntry: LogEntry, subType: String) { + open fun update(logEntry: LogEntry, subType: String?) { /* default is do nothing - can be overridden in subclasses */ } diff --git a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/aggregator/CollectionAggregator.kt b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/aggregator/CollectionAggregator.kt index 3b643882ed..61dbe02382 100644 --- a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/aggregator/CollectionAggregator.kt +++ b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/aggregator/CollectionAggregator.kt @@ -41,7 +41,7 @@ class CollectionAggregator(actionTitle: String, val parent: ObjectAggregator? = dpm = CollectionDM(actionTitle) } - override fun update(logEntry: LogEntry, subType: String) { + override fun update(logEntry: LogEntry, subType: String?) { super.update(logEntry, subType) if (logEntry.state == EventState.DUPLICATE) { console.log("[CollectionAggregator.update] TODO duplicates should not be propagated to handlers") diff --git a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/aggregator/DomainTypesAggregator.kt b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/aggregator/DomainTypesAggregator.kt index 3027f65bb3..3c23df71b9 100644 --- a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/aggregator/DomainTypesAggregator.kt +++ b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/aggregator/DomainTypesAggregator.kt @@ -29,7 +29,7 @@ class DomainTypesAggregator(val url: String) : BaseAggregator() { dpm = DiagramDM(url) } - override fun update(logEntry: LogEntry, subType: String) { + override fun update(logEntry: LogEntry, subType: String?) { when (val obj = logEntry.getTransferObject()) { is DomainTypes -> handleDomainTypes(obj) is DomainType -> handleDomainType(obj) diff --git a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/aggregator/DownloadDispatcher.kt b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/aggregator/DownloadDispatcher.kt index 48fe1f621a..1323746f92 100644 --- a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/aggregator/DownloadDispatcher.kt +++ b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/aggregator/DownloadDispatcher.kt @@ -23,7 +23,7 @@ import org.apache.isis.client.kroviz.ui.dialog.FileDialog class DownloadDispatcher(val actionTitle: String) : BaseAggregator() { - override fun update(logEntry: LogEntry, subType: String) { + override fun update(logEntry: LogEntry, subType: String?) { FileDialog(logEntry).open() } diff --git a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/aggregator/ErrorDispatcher.kt b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/aggregator/ErrorDispatcher.kt index 3b6cec5181..5011e9f727 100644 --- a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/aggregator/ErrorDispatcher.kt +++ b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/aggregator/ErrorDispatcher.kt @@ -22,11 +22,10 @@ import org.apache.isis.client.kroviz.core.event.LogEntry import org.apache.isis.client.kroviz.core.event.ResourceSpecification import org.apache.isis.client.kroviz.to.HttpErrorResponse import org.apache.isis.client.kroviz.ui.core.SessionManager -import org.apache.isis.client.kroviz.ui.dialog.ErrorDialog class ErrorDispatcher : BaseAggregator() { - override fun update(logEntry: LogEntry, subType: String) { + override fun update(logEntry: LogEntry, subType: String?) { val error = logEntry.getTransferObject() as HttpErrorResponse val url = logEntry.url val message = error.getMessage() diff --git a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/aggregator/NavigationDispatcher.kt b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/aggregator/NavigationDispatcher.kt index 6fff7132db..00b0d9fef1 100644 --- a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/aggregator/NavigationDispatcher.kt +++ b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/aggregator/NavigationDispatcher.kt @@ -24,7 +24,7 @@ import org.apache.isis.client.kroviz.ui.core.ViewManager class NavigationDispatcher() : BaseAggregator() { - override fun update(logEntry: LogEntry, subType: String) { + override fun update(logEntry: LogEntry, subType: String?) { val obj = logEntry.getTransferObject() val result = obj as Menubars ViewManager.amendMenu(result) diff --git a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/aggregator/ObjectAggregator.kt b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/aggregator/ObjectAggregator.kt index 05c981c923..a222f5ff6a 100644 --- a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/aggregator/ObjectAggregator.kt +++ b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/aggregator/ObjectAggregator.kt @@ -42,7 +42,7 @@ class ObjectAggregator(val actionTitle: String) : AggregatorWithLayout() { dpm = ObjectDM(actionTitle) } - override fun update(logEntry: LogEntry, subType: String) { + override fun update(logEntry: LogEntry, subType: String?) { super.update(logEntry, subType) if (!logEntry.isUpdatedFromParentedCollection()) { val referrer = logEntry.url diff --git a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/aggregator/RestfulDispatcher.kt b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/aggregator/RestfulDispatcher.kt index ccaba1dcd4..70a928e160 100644 --- a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/aggregator/RestfulDispatcher.kt +++ b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/aggregator/RestfulDispatcher.kt @@ -27,7 +27,7 @@ import org.apache.isis.client.kroviz.ui.core.SessionManager class RestfulDispatcher() : BaseAggregator() { - override fun update(logEntry: LogEntry, subType: String) { + override fun update(logEntry: LogEntry, subType: String?) { val restful = logEntry.getTransferObject() as Restful restful.links.forEach { val rel = it.rel diff --git a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/aggregator/SvgDispatcher.kt b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/aggregator/SvgDispatcher.kt index 4137cede49..2c133f0fd8 100644 --- a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/aggregator/SvgDispatcher.kt +++ b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/aggregator/SvgDispatcher.kt @@ -19,13 +19,12 @@ package org.apache.isis.client.kroviz.core.aggregator import org.apache.isis.client.kroviz.core.event.LogEntry -import org.apache.isis.client.kroviz.ui.panel.SvgPanel import org.apache.isis.client.kroviz.utils.DomUtil import org.apache.isis.client.kroviz.utils.UUID class SvgDispatcher(val callBack: Any) : BaseAggregator() { - override fun update(logEntry: LogEntry, subType: String) { + override fun update(logEntry: LogEntry, subType: String?) { val response = logEntry.response when (callBack) { is UUID -> DomUtil.appendTo(callBack, response) diff --git a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/aggregator/SystemAggregator.kt b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/aggregator/SystemAggregator.kt index 82c9d6b04a..0ac4610481 100644 --- a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/aggregator/SystemAggregator.kt +++ b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/aggregator/SystemAggregator.kt @@ -33,7 +33,7 @@ class SystemAggregator() : BaseAggregator() { dpm = SystemDM("not filled (yet)") } - override fun update(logEntry: LogEntry, subType: String) { + override fun update(logEntry: LogEntry, subType: String?) { when (val obj = logEntry.getTransferObject()) { is User -> dpm.addData(obj) is Version -> dpm.addData(obj) diff --git a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/aggregator/UndefinedDispatcher.kt b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/aggregator/UndefinedDispatcher.kt index d2ea778e3c..61dac0e3d8 100644 --- a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/aggregator/UndefinedDispatcher.kt +++ b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/aggregator/UndefinedDispatcher.kt @@ -23,7 +23,7 @@ import org.apache.isis.client.kroviz.ui.dialog.UndefinedDialog class UndefinedDispatcher : BaseAggregator() { - override fun update(logEntry: LogEntry, subType: String) { + override fun update(logEntry: LogEntry, subType: String?) { UndefinedDialog(logEntry).open() } diff --git a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/event/LogEntry.kt b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/event/LogEntry.kt index ef2024b1ef..d0cfbb3301 100644 --- a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/event/LogEntry.kt +++ b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/event/LogEntry.kt @@ -58,7 +58,7 @@ data class LogEntry( val request: String = "", @Contextual val createdAt: Date = Date(), ) { - val url: String = rs?.url + val url: String = rs.url //rs?.url //?. is required, otherwise Tabulator.js/EventLogTable shows no entries val subType = rs?.subType diff --git a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/event/ResourceProxy.kt b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/event/ResourceProxy.kt index f686fc130d..ec1f90f4fc 100644 --- a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/event/ResourceProxy.kt +++ b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/event/ResourceProxy.kt @@ -55,11 +55,12 @@ class ResourceProxy { } } - fun fetch(link: Link, - aggregator: BaseAggregator? = null, - subType: String = Constants.subTypeJson, - isRest: Boolean = true, - referrer: String = "") { + fun fetch( + link: Link, + aggregator: BaseAggregator? = null, + subType: String? = Constants.subTypeJson, + isRest: Boolean = true, + referrer: String = "") { val rs = ResourceSpecification(link.href, subType = subType, referrerUrl = referrer) val le = findAndSetupLogEntry(rs) val isCached = when (le) { @@ -95,7 +96,7 @@ class ResourceProxy { return first } - private fun process(aggregator: BaseAggregator?, link: Link, subType: String, referrer: String) { + private fun process(aggregator: BaseAggregator?, link: Link, subType: String?, referrer: String) { if (aggregator is AggregatorWithLayout) { if (aggregator.tree == null) { val root = Node(referrer, null) diff --git a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/event/ResourceSpecification.kt b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/event/ResourceSpecification.kt index 3019d3a9db..9c5519d0b9 100644 --- a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/event/ResourceSpecification.kt +++ b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/event/ResourceSpecification.kt @@ -23,9 +23,9 @@ import org.apache.isis.client.kroviz.utils.StringUtils import org.apache.isis.client.kroviz.utils.UrlUtils class ResourceSpecification( - val url: String, - val subType: String = Constants.subTypeJson, - val referrerUrl: String = "") { + val url: String, + val subType: String? = Constants.subTypeJson, + val referrerUrl: String = "") { fun isRedundant(): Boolean { return when { diff --git a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/event/RoXmlHttpRequest.kt b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/event/RoXmlHttpRequest.kt index cbd4d941eb..64206f3e46 100644 --- a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/event/RoXmlHttpRequest.kt +++ b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/core/event/RoXmlHttpRequest.kt @@ -43,7 +43,7 @@ class RoXmlHttpRequest(val aggregator: BaseAggregator?) { private val CONTENT_TYPE = "Content-Type" private val ACCEPT = "Accept" - internal fun process(link: Link, subType: String) { + internal fun process(link: Link, subType: String?) { val method = link.method var url = link.href if (method != Method.POST.operation) { @@ -83,7 +83,7 @@ class RoXmlHttpRequest(val aggregator: BaseAggregator?) { } } - internal fun processNonREST(link: Link, subType: String) { + internal fun processNonREST(link: Link, subType: String?) { val method = link.method val url = link.href @@ -114,7 +114,7 @@ class RoXmlHttpRequest(val aggregator: BaseAggregator?) { private fun buildResourceSpecificationAndSetupHandler( url: String, - subType: String, + subType: String?, body: String ): ResourceSpecification { val rs = ResourceSpecification(url, subType) diff --git a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/panel/GeoMap.kt b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/panel/GeoMap.kt index 19cd766b01..21fc5cf504 100644 --- a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/panel/GeoMap.kt +++ b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/panel/GeoMap.kt @@ -36,9 +36,10 @@ import org.apache.isis.client.kroviz.utils.IconManager class GeoMap : HPanel() { init { - val m = maps(53.65425, 10.1545, 15) { - width = 100.pc - height = 100.pc + val m = Maps { + width = CssSize(100, UNIT.pc) + height = CssSize(100, UNIT.pc) + margin = CssSize(10, UNIT.px) } val home = LatLng(53.65425, 10.1545) diff --git a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/panel/SvgMap.kt b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/panel/SvgMap.kt index 6e27331466..a423a705cb 100644 --- a/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/panel/SvgMap.kt +++ b/incubator/clients/kroviz/src/main/kotlin/org/apache/isis/client/kroviz/ui/panel/SvgMap.kt @@ -18,15 +18,18 @@ */ package org.apache.isis.client.kroviz.ui.panel -import org.apache.isis.client.kroviz.utils.ScalableVectorGraphic -import io.kvision.maps.* +import io.kvision.core.CssSize +import io.kvision.core.UNIT +import io.kvision.maps.Maps import io.kvision.panel.SimplePanel -import io.kvision.utils.pc +import io.kvision.utils.obj +import org.apache.isis.client.kroviz.utils.ScalableVectorGraphic class SvgMap : SimplePanel() { @Deprecated("pass in as arg") - val str = """<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" contentScriptType="application/ecmascript" contentStyleType="text/css" height="4881.25px" preserveAspectRatio="none" style="width:6395px;height:4881px;" version="1.1" viewBox="0 0 6395 4881" width="6395.8333px" zoomAndPan="magnify"><defs><filter height="300%" id="f1o3ddckp2b3gs" width="300%" x="-1" y="-1"><feGaussianBlur result="blurOut [...] + val str = + """<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" contentScriptType="application/ecmascript" contentStyleType="text/css" height="4881.25px" preserveAspectRatio="none" style="width:6395px;height:4881px;" version="1.1" viewBox="0 0 6395 4881" width="6395.8333px" zoomAndPan="magnify"><defs><filter height="300%" id="f1o3ddckp2b3gs" width="300%" x="-1" y="-1"><feGaussianBlur result="blurOut" stdD [...] @startuml skinparam dpi 200 @@ -418,21 +421,39 @@ Country: US """ init { - val map = maps(0, 0, 11, baseLayerProvider = BaseLayerProvider.EMPTY) { - width = 100.pc - height = 100.pc + val map = Maps { + width = CssSize(100, UNIT.pc) + height = CssSize(100, UNIT.pc) + margin = CssSize(10, UNIT.px) } - val svg = ScalableVectorGraphic(str) - svg.scaleHorizontally() - val svgDoc = svg.document - val svgElement = svgDoc.documentElement + map.configureLeafletMap { + val optionsDynamic: dynamic = options.asDynamic() + optionsDynamic.contextmenuItems = listOf( + obj { + text = "Zoom in" + icon = "images/zoom-in.png" + }, + "-", + obj { + text = "Center map here" + callback = { e: dynamic -> + [email protected](e.latlng) + } + }, + ) + + val svg = ScalableVectorGraphic(str) + svg.scaleHorizontally() + val svgDoc = svg.document + val svgElement = svgDoc.documentElement //TODO implement extension function and adopt new version of kvsion.maps /* val bounds = LatLngBounds( LatLng(0, 0), LatLng(0.1, 0.1)) map.svgOverlay(svgElement, bounds)*/ -} + } + } } diff --git a/incubator/clients/kroviz/src/test/kotlin/org/apache/isis/client/kroviz/core/aggregator/DispatchInterceptor.kt b/incubator/clients/kroviz/src/test/kotlin/org/apache/isis/client/kroviz/core/aggregator/DispatchInterceptor.kt index a88b2a9ed1..3840b219c2 100644 --- a/incubator/clients/kroviz/src/test/kotlin/org/apache/isis/client/kroviz/core/aggregator/DispatchInterceptor.kt +++ b/incubator/clients/kroviz/src/test/kotlin/org/apache/isis/client/kroviz/core/aggregator/DispatchInterceptor.kt @@ -9,7 +9,7 @@ class DispatchInterceptor : BaseAggregator() { var logEntry: LogEntry? = null - override fun update(logEntry: LogEntry, subType: String) { + override fun update(logEntry: LogEntry, subType: String?) { this.logEntry = logEntry console.log("[DI.update]") console.log(logEntry)
