Skip to content

Commit 0000000

Browse files
committed
fix arrows on 0.24
1 parent bfd3249 commit 0000000

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

ext/MakieExt.jl

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,16 +49,12 @@ Makie.expand_dimensions(ct::GridBased, x::KeyedArray{<:Any,2}) = (_ustrip.(axisk
4949
Makie.expand_dimensions(ct::Union{VertexGrid,CellGrid}, x::KeyedArray{<:Any,2}) = (_ustrip.(axiskeys(x))..., x |> _ustrip)
5050

5151
Makie.convert_arguments(ct::Type{<:Arrows}, x::KeyedArray{<:Any,2}) =
52-
Point2f.(_ustrip(axiskeys(x, 1)), _ustrip(axiskeys(x, 2))'), x |> _ustrip
52+
Point2.(_ustrip(axiskeys(x, 1)), _ustrip(axiskeys(x, 2))'), Point2.(x) |> _ustrip
5353

54-
if isdefined(Makie, :_is_3d_arrows)
55-
# Makie 0.24
54+
if pkgversion(Makie) v"0.24"
55+
# _is_3d_arrows is only for arrows() to work; arrows2d() doesn't need it
5656
Makie._is_3d_arrows(::Union{KeyedArray{<:Any,2}, Observable{<:KeyedArray{<:Any,2}}}) = false
57-
Makie._is_3d_arrows(::Union{KeyedArray{<:Any,3}, Observable{<:KeyedArray{<:Any,3}}}) = true
58-
59-
Makie.plot!(p::Arrows{<:Tuple{AbstractMatrix, KeyedArray}}) = arrows2d!(p, p.attributes, lift(vec, p[1]), lift(vec, p[2]))
6057
else
61-
# Makie 0.22
6258
Makie.plot!(p::Arrows{<:Tuple{AbstractMatrix, KeyedArray}}) = arrows!(p, p.attributes, lift(vec, p[1]), lift(vec, p[2]))
6359
end
6460

0 commit comments

Comments
 (0)