From 450b36bdde9b5354c59dbb0374f5129bfc3d23d0 Mon Sep 17 00:00:00 2001 From: Daniel Schwabeneder Date: Sun, 12 Apr 2020 00:37:48 +0200 Subject: [PATCH] small cleanup in utils --- src/utils.jl | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/utils.jl b/src/utils.jl index 063e5ce6..43a759d3 100644 --- a/src/utils.jl +++ b/src/utils.jl @@ -130,10 +130,8 @@ _cycle(v::AVec, indices::AVec{Int}) = map(i -> _cycle(v,i), indices) _cycle(v::AMat, indices::AVec{Int}) = map(i -> _cycle(v,i), indices) _cycle(v, indices::AVec{Int}) = fill(v, length(indices)) -_cycle(cg::ColorGradient, idx::Int) = cg[mod1(idx, end)] -_cycle(cg::ColorGradient, idx::AVec{Int}) = cg[mod1.(idx, end)] -_cycle(cp::ColorPalette, idx::Int) = cp[mod1(idx, end)] -_cycle(cp::ColorPalette, idx::AVec{Int}) = cp[mod1.(idx, end)] +_cycle(cl::PlotUtils.AbstractColorList, idx::Int) = cl[mod1(idx, end)] +_cycle(cl::PlotUtils.AbstractColorList, idx::AVec{Int}) = cl[mod1.(idx, end)] _as_gradient(grad) = grad _as_gradient(c::Colorant) = ColorGradient([c,c])