38 Commits

Author SHA1 Message Date
Kyℓe Hensel
6f16060a78 mass-replace done() function with async/await (#10781) 2025-02-17 13:10:04 +01:00
Bryan Housel
33fab5580b Before calling init() make sure the assetPath is set
init kicks off building the ui, which can fetch spritesheets for the <defs>
The assetPath needs to be set otherwise these files will not be found
2021-08-16 22:06:42 -04:00
Quincy Morgan
a58abe3c6f Move localStorage interface from a property of coreContext to a corePreferences function 2020-04-01 11:00:48 -07:00
Bryan Housel
919687d2cf Replace legacy names still used in tests, remove the legacy exports 2020-02-21 23:12:25 -05:00
Bryan Housel
e19bcb77d5 Require init() call before coreContext starts doing things
(closes #7304)
2020-01-29 19:27:12 -05:00
Bryan Housel
0dd262d1dd Don't dispatch 'change' on history.merged, dispatch 'merge' only
Change performs an expensive immediate redraw, and merge can schedule
a redraw for later.
2019-04-12 09:56:18 -04:00
Bryan Housel
0c7d98673a Fix form of chai not called assertion 2019-03-25 10:03:27 -04:00
Bryan Housel
6da2ba7b9d Make sure pause/resumeChangeDispatch can be called multiple times 2019-03-06 15:41:12 -05:00
Bryan Housel
0ea69548ea Add history.pauseChangeDispatch / history.resumeChangeDispatch
To avoid dispatching change events at improper times
2019-03-06 15:41:12 -05:00
Bryan Housel
71b2d2c6b7 Upgrade legacy symbols in tests
- iD.Context -> iD.coreContext
- iD.Graph -> iD.coreGraph
- iD.Node -> iD.osmNode
- iD.Way -> iD.osmWay
- iD.Relation -> iD.osmRelation
2019-01-30 15:43:02 -05:00
Bryan Housel
b3842d97f4 Remove lodash from the test suite
(closes #4378)
2017-10-18 14:37:39 -04:00
Bryan Housel
ef95db8524 Add ability to history.pop n times
This is a little better than just calling pop a bunch of times because
it avoids dispatching extra history change events
2017-05-03 16:03:56 -04:00
Bryan Housel
2ebfcd174e Don't redo into un-annotated edit states
(closes #4006)
2017-05-03 00:21:37 -04:00
Bryan Housel
833a67f399 Allow history to set checkpoints and reset to them 2017-03-22 22:05:27 -04:00
Bryan Housel
9ba610a977 Add test for transitioned history.perform 2017-01-04 16:06:09 -05:00
Bryan Housel
f800e5afbc Remove unnecessary window parameter to Context 2016-11-10 15:19:03 -05:00
Bryan Housel
87950fd472 Fix lib export, flatten names in tests and docs 2016-10-04 21:56:09 -04:00
Bryan Housel
7ca6d06254 Replace iD global with iD.Context() module (#3254) 2016-07-19 10:15:32 -04:00
Kushan Joshi
6c542505a4 Add linting to spec/core 2016-06-15 18:26:11 +05:30
Bryan Housel
728036be51 Don't write unsavable changes to localStorage (closes #2705) 2015-06-20 12:21:29 -04:00
Bryan Housel
147e369c3b Add graph#overwrite (same as pop followed by perform)
to remove some of the overhead in creating difference and dispatching
change event multiple times..
2015-02-02 22:01:49 -05:00
Bryan Housel
1f544e883b bump chai to 1.9.2 and fix tests affected by change in equality testing
re #2388
2014-10-28 21:37:04 -04:00
John Firebaugh
2ab9239a9f More accurate modification tests 2014-02-25 10:12:34 -08:00
tyr
efd3223e0c extend history loading fix to deletions
Deleted objects need to be kept in the base of the history stack, too.

This also improves the respective unit tests.
2014-02-22 14:09:17 +01:00
tyr
86c4bc9105 add tests for "restoring from v3 JSON" (core/history.js) 2014-02-21 10:19:36 +01:00
tyr
fc0a15e6c4 fix duplicate objects after restoring data from localStorage
This makes sure that the originals of changed entities get merged
into the base of the stack after restoring the data from JSON.
This is necessary, because the stack will only have elements for
the current viewport after a restart and previously *modified*
objects will now be falsely detected as *created* ones.

Also removed some ineffective code.
2014-02-21 10:01:26 +01:00
John Firebaugh
492fc88aa4 Make the Graph#rebase argument an array 2013-10-31 16:24:31 -07:00
John Firebaugh
697faf0265 Use summary to calculate # in Save button 2013-10-23 13:36:58 -07:00
John Firebaugh
81bc280aba More reliable method for mutexed localStorage saves
Fixes #1883
2013-10-10 14:59:48 -07:00
John Firebaugh
a8f6c30a36 Fix test 2013-08-16 14:19:56 -07:00
John Firebaugh
2efafa087b Deduplicate entities in serialized history
Fixes #1403
2013-08-14 16:49:53 -07:00
John Firebaugh
1db99586c4 Render only new features when a data tile is loaded 2013-05-20 12:05:31 -07:00
John Firebaugh
c50c3121d8 Make Graph#entity strict
Use Graph#hasEntity for the previous behavior.
2013-04-24 09:27:37 -07:00
Ansis Brammanis
c6200931e1 update tests for iD.Difference fix 2013-04-18 17:02:19 -04:00
John Firebaugh
f7fb12be76 Fix #1120, inconsistent undo for line/area drawing
Gulp!
2013-03-27 16:25:10 -07:00
Ansis Brammanis
2b4e260953 walkthrough now runnable in the middle of editing
history.toJSON and .fromJSON are now split out of.
history.save and .restore.
2013-03-27 11:52:50 -04:00
Ansis Brammanis
a21b973a41 Fix saving deletions to storage, add tests 2013-02-13 12:42:51 -05:00
John Firebaugh
843baa11c0 graph -> core
This matches how it's described in ARCHITECTURE.md.
2013-02-09 15:18:54 -08:00