moved to utils to load first
This commit is contained in:
parent
d35c922529
commit
eb9f8fd180
@ -77,22 +77,3 @@ function plotattr(attrtype::Symbol, attribute::AbstractString)
|
|||||||
def == "" ? "" : " default: $(printnothing(def))",
|
def == "" ? "" : " default: $(printnothing(def))",
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
axisattrcache = Dict{Symbol, Dict{Symbol, Symbol}}()
|
|
||||||
|
|
||||||
get_axis_attr(letter, keyword::String) = get_axis_attr(letter, Symbol(keyword))
|
|
||||||
function get_axis_attr(letter, keyword)
|
|
||||||
lt = if haskey(axisattrcache, letter)
|
|
||||||
axisattrcache[letter]
|
|
||||||
else
|
|
||||||
axisattrcache[letter] = Dict{Symbol, Symbol}()
|
|
||||||
end
|
|
||||||
|
|
||||||
lk = if haskey(lt, keyword)
|
|
||||||
lt[keyword]
|
|
||||||
else
|
|
||||||
lt[keyword] = Symbol(letter, keyword)
|
|
||||||
end
|
|
||||||
|
|
||||||
return lk
|
|
||||||
end
|
|
||||||
|
|||||||
19
src/utils.jl
19
src/utils.jl
@ -1214,3 +1214,22 @@ function mesh3d_triangles(x, y, z, cns)
|
|||||||
end
|
end
|
||||||
return X, Y, Z
|
return X, Y, Z
|
||||||
end
|
end
|
||||||
|
|
||||||
|
axisattrcache = Dict{Symbol, Dict{Symbol, Symbol}}()
|
||||||
|
|
||||||
|
get_axis_attr(letter, keyword::String) = get_axis_attr(letter, Symbol(keyword))
|
||||||
|
function get_axis_attr(letter, keyword)
|
||||||
|
lt = if haskey(axisattrcache, letter)
|
||||||
|
axisattrcache[letter]
|
||||||
|
else
|
||||||
|
axisattrcache[letter] = Dict{Symbol, Symbol}()
|
||||||
|
end
|
||||||
|
|
||||||
|
lk = if haskey(lt, keyword)
|
||||||
|
lt[keyword]
|
||||||
|
else
|
||||||
|
lt[keyword] = Symbol(letter, keyword)
|
||||||
|
end
|
||||||
|
|
||||||
|
return lk
|
||||||
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user