All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.Insert.kt Maven / Gradle / Ivy

The newest version!
package com.juul.krayon.selection

import com.juul.krayon.element.Element
import com.juul.krayon.element.ElementBuilder
import com.juul.krayon.element.ElementSelector

/** See analogous [d3 function](https://github.com/d3/d3-selection#selection_insert). */
public fun  Selection.insert(
    builder: ElementBuilder,
    before: ElementSelector<*>,
): Selection = select { insertBefore(builder.build(), query(before)) }

/** See analogous [d3 function](https://github.com/d3/d3-selection#selection_insert). */
public inline fun  Selection.insert(
    crossinline value: E1.(Arguments) -> E2,
    before: ElementSelector<*>,
): Selection = select { args -> insertBefore(value(args), query(before)) }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy