Skip to content

Commit

Permalink
fix constructor for nested attributes (#3284)
Browse files Browse the repository at this point in the history
  • Loading branch information
hexaeder authored Oct 12, 2023
1 parent c9010c3 commit 8479b2e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions MakieCore/src/attributes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ node_pairs(pair::Union{Pair, Tuple{Any, Any}}) = (pair[1] => node_any(value_conv
node_pairs(pairs) = (node_pairs(pair) for pair in pairs)

Attributes(; kw_args...) = Attributes(Dict{Symbol, Observable}(node_pairs(kw_args)))
Attributes(pairs::Dict) = Attributes(Dict{Symbol, Observable}(node_pairs(pairs)))
Attributes(pairs::Pair...) = Attributes(Dict{Symbol, Observable}(node_pairs(pairs)))
Attributes(pairs::AbstractVector) = Attributes(Dict{Symbol, Observable}(node_pairs.(pairs)))
Attributes(pairs::Iterators.Pairs) = Attributes(collect(pairs))
Expand Down

0 comments on commit 8479b2e

Please sign in to comment.