Commit Graph

14 Commits

Author SHA1 Message Date
John Firebaugh fc00f154a9 Dispatch a change event on merge 2013-02-02 19:47:56 -05:00
John Firebaugh ddc5e324f6 Extract iD.Difference
iD.Difference represents the difference between two graphs.
It knows how to calculate the set of entities that were
created, modified, or deleted, and also contains the logic
for recursively extending a difference to the complete set
of entities that will require a redraw, taking into account
child and parent relationships.

Additionally, all history mutators now return a difference.
2013-02-02 19:47:56 -05:00
Ansis Brammanis 1b5a1b8268 Merge takes an entities object, not graph 2013-01-30 14:20:39 -05:00
John Firebaugh e09666bbdc Fixing draw mode bugs
Disabling interactive draw undo for now. I know how to fix it
but it's a bit tricky. So undo will just drop you out to browse
mode for the time being.

Fixes #477.
Fixes #516.
2013-01-26 15:24:14 -05:00
John Firebaugh 3105923371 Wrap all actions in Graph#update 2013-01-25 13:43:35 -05:00
John Firebaugh 814c3608db Hook into undos in a different way
This way doesn't depend on details of keybindings and
the undo button.

Also, implement this in DrawArea mode.
2013-01-22 14:55:08 -05:00
Brandon Liu ded802049a add history.numChanges method.
Use hasChanges/numChanges to toggle Save button and show confirmation dialog when navigating away from page.
2013-01-19 23:16:48 -08:00
Brandon Liu d83ec7f1eb Create method history.hasChanges 2013-01-19 23:01:47 -08:00
John Firebaugh c5c65ccdfd Include difference in history change events 2012-12-07 12:35:57 -05:00
John Firebaugh 255e3aaabd Modify Graph so it can track deleted ids 2012-12-07 12:32:24 -05:00
John Firebaugh 3e45afbc5e Move history annotation to History#perform/replace
Actions are too low-level for annotations.
2012-12-07 10:35:39 -05:00
John Firebaugh 27af384a3f Allow History#{perform,replace} to run multiple actions 2012-12-06 18:36:03 -05:00
John Firebaugh 077e5cc9ce Rename various actions 2012-12-05 16:42:48 -05:00
John Firebaugh b4707c3a1f Mirror main directory structure in specs 2012-12-04 09:50:07 -05:00