moved to utils to load first

This commit is contained in:
Nicholas Bauer 2021-08-27 02:07:19 -04:00
parent d35c922529
commit eb9f8fd180
2 changed files with 19 additions and 19 deletions

View File

@ -77,22 +77,3 @@ function plotattr(attrtype::Symbol, attribute::AbstractString)
def == "" ? "" : " default: $(printnothing(def))",
)
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

View File

@ -1214,3 +1214,22 @@ function mesh3d_triangles(x, y, z, cns)
end
return X, Y, Z
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