Vis4Sense / HistoryMap

http://sensemap.io
60 stars 7 forks source link

Capture page reopening (potential race condition) #149

Open Yuu-Han opened 9 months ago

Yuu-Han commented 9 months ago

(As we talked in Feb 5 meeting) Clicking a closed node on historymap will reopen the page and set its state to open, not adding a new node (see #148). In other words, for a newly opened page, we need to know if it is opened from a closed one in order to determine whether to create a new node.

Yuu-Han commented 9 months ago

In the latest implementation, the success of the capturing relies on event 1 happening earlier than event 2:

Maybe this works because the page opening event is exposed after the create function (including the callback) is done (but not entirely sure).