Update instances of findfirst to 1.0 syntax

This commit is contained in:
Michael Krabbe Borregaard 2018-08-14 10:24:01 +02:00
parent afb7a17e5f
commit 0710fba638
3 changed files with 4 additions and 4 deletions

View File

@ -38,7 +38,7 @@ function _series_updated(plt::Plot{PlotlyJSBackend}, series::Series)
end
PlotlyJS.restyle!(
plt.o,
findfirst(plt.series_list, series),
findfirst(isequal(series), plt.series_list),
kw
)
end

View File

@ -283,11 +283,11 @@ end
function plot(sp::Subplot, args...; kw...)
plt = sp.plt
plot(plt, args...; kw..., subplot = findfirst(plt.subplots, sp))
plot(plt, args...; kw..., subplot = findfirst(isequal(sp), plt.subplots))
end
function plot!(sp::Subplot, args...; kw...)
plt = sp.plt
plot!(plt, args...; kw..., subplot = findfirst(plt.subplots, sp))
plot!(plt, args...; kw..., subplot = findfirst(isequal(sp), plt.subplots))
end
# --------------------------------------------------------------------

View File

@ -46,7 +46,7 @@ function plotattr(attrtype::Symbol, attribute::AbstractString)
attribute = Symbol(lookup_aliases(attrtype, attribute))
desc = get(_arg_desc, attribute, "")
first_period_idx = findfirst(desc, '.')
first_period_idx = findfirst(isequal('.'), desc)
typedesc = desc[1:first_period_idx-1]
desc = strip(desc[first_period_idx+1:end])
als = keys(filter((_,v)->v==attribute, _keyAliases)) |> collect |> sort