Remove unused code
authorLanius Trolling <lanius@laniustrolling.dev>
Thu, 28 Dec 2023 17:48:07 +0000 (12:48 -0500)
committerLanius Trolling <lanius@laniustrolling.dev>
Thu, 28 Dec 2023 17:48:07 +0000 (12:48 -0500)
src/mapMain/kotlin/com/github/nwillc/ksvg/elements/Element.kt
src/mapMain/kotlin/com/github/nwillc/ksvg/elements/SVGTooltip.kt [deleted file]

index 36735cd27959fd85edbf9b0e6d6ce42e94751289..636df6dd36a19f36168742dbadada10ec30f4047 100644 (file)
@@ -54,11 +54,6 @@ abstract class Element(
         */
        var body: String = ""
        
-       /**
-        * HTML tooltip of this SVG Element.
-        */
-       var tooltip: SVGTooltip? = null
-       
        /**
         * Add a child element.
         */
@@ -96,11 +91,6 @@ abstract class Element(
                        children.forEach {
                                it.render(appendable, renderMode)
                        }
-                       tooltip?.let { (htmlId, html) ->
-                               appendable.append("<div id=\"$htmlId\" class=\"tooltip\">")
-                               appendable.append(html)
-                               appendable.append("</div>")
-                       }
                        appendable.append("</$name>\n")
                }
        }
@@ -115,15 +105,11 @@ abstract class Element(
         */
        fun hasChildren(): Boolean = children.isNotEmpty()
        
-       /**
-        * Has tooltip
-        */
-       fun hasTooltip(): Boolean = tooltip != null
        
        /**
         * Has any content, i.e. a body and/or children.
         */
-       fun hasContent(): Boolean = hasBody() || hasChildren() || hasTooltip()
+       fun hasContent(): Boolean = hasBody() || hasChildren()
        
        /**
         * Returns the rendered inline SVG as a String.
diff --git a/src/mapMain/kotlin/com/github/nwillc/ksvg/elements/SVGTooltip.kt b/src/mapMain/kotlin/com/github/nwillc/ksvg/elements/SVGTooltip.kt
deleted file mode 100644 (file)
index 52b98de..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-package com.github.nwillc.ksvg.elements
-
-data class SVGTooltip(val id: String, val innerHTML: String)