Skip to content

Commit

Permalink
Use new export API to avoid deprecation warnings with latest kino (#61)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonatanklosko authored Sep 21, 2023
1 parent d064265 commit ef9d0c2
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions lib/kino/maplibre.ex
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,22 @@ defmodule Kino.MapLibre do
@doc false
def static(%__MODULE__{} = ml) do
data = %{spec: ml.spec, events: ml.events}
Kino.JS.new(__MODULE__, data, export_info_string: "maplibre")

Kino.JS.new(__MODULE__, data,
export: fn data -> {"maplibre", data} end,
# TODO: remove legacy export attribute once we require Kino v0.11.0
export_info_string: "maplibre"
)
end

def static(%MapLibre{} = ml) do
data = %{spec: ml.spec, events: %{}}
Kino.JS.new(__MODULE__, data, export_info_string: "maplibre")

Kino.JS.new(__MODULE__, data,
export: fn data -> {"maplibre", data} end,
# TODO: remove legacy export attribute once we require Kino v0.11.0
export_info_string: "maplibre"
)
end

@doc """
Expand Down

0 comments on commit ef9d0c2

Please sign in to comment.