diff --git a/Project.toml b/Project.toml index fdd288bf55..2111142c50 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "Agents" uuid = "46ada45e-f475-11e8-01d0-f70cc89e6671" authors = ["George Datseris", "Tim DuBois", "Aayush Sabharwal", "Ali Vahdati", "Adriano Meligrana"] -version = "6.1.8" +version = "6.1.9" [deps] CSV = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b" diff --git a/ext/AgentsVisualizations/src/spaces/grid.jl b/ext/AgentsVisualizations/src/spaces/grid.jl index 71ae3eb615..7bd31e8dd7 100644 --- a/ext/AgentsVisualizations/src/spaces/grid.jl +++ b/ext/AgentsVisualizations/src/spaces/grid.jl @@ -24,9 +24,10 @@ end ## Inspection -Agents.convert_element_pos(::S, pos) where {S<:Agents.AbstractGridSpace} = - Tuple(round.(Int, pos)) # using round to handle positions with offset - +function Agents.convert_element_pos(s::S, pos) where {S<:Agents.AbstractGridSpace} + gridpos = pos[1:length(spacesize(s))] + Tuple(round.(Int, gridpos)) # using round to handle positions with offset +end function Agents.ids_to_inspect(model::ABM{<:GridSpaceSingle}, pos) id = id_in_position(pos, model) return id == 0 ? () : (id,)