Skip to content

Commit 273be12

Browse files
authored
Handle nonexistent node position in graph visualization (#1187)
* Handle nonexistent node position in graph visualization Add check for node position on hover before creating the tooltip * Increase Agents version
1 parent 44ec181 commit 273be12

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "Agents"
22
uuid = "46ada45e-f475-11e8-01d0-f70cc89e6671"
33
authors = ["George Datseris", "Tim DuBois", "Aayush Sabharwal", "Ali Vahdati", "Adriano Meligrana"]
4-
version = "6.3.0"
4+
version = "6.3.1"
55

66
[deps]
77
CSV = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b"

ext/AgentsGraphVisualizations/src/spaces/graph.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,9 @@ function Makie.show_data(inspector::DataInspector,
7474
gp = p.plots[findfirst(x -> isa(x, GraphMakie.GraphPlot), p.plots)]
7575
# get position (Int) matching currently hovered node position (Point2f/Point3f)
7676
node_pos = findfirst(==(pos), gp.node_pos[])
77+
if isnothing(node_pos)
78+
return false
79+
end
7780

7881
model = p.abmobs[].model[]
7982
a = inspector.plot.attributes

0 commit comments

Comments
 (0)