Commit Graph

174 Commits

Author SHA1 Message Date
samanpwbb d141827c3e Merge branch 'master' into conflict-resolution-ui 2015-02-06 19:08:50 -05:00
Bryan Housel ed4929273d Return entities from iD.Connection via callbacks
(instead of dispatching `load` event to merge them into `history`)

This is cleaner becuase now `context` doesn't need to keep an
`altGraph` state used only for Conflict Resolution.

The conflict resolution code calls the `iD.Connection` methods directly,
and other places in the code call `loadEntity` and `loadTiles` wrappers
that merge the entities into the main history.
2015-01-08 14:44:58 -05:00
Bryan Housel d9f204cf45 Remove Graph#freeze 2015-01-07 11:52:17 -05:00
Bryan Housel 90147b23db Make copy handle circular and other degenerate Relations 2015-01-04 23:15:47 -05:00
Bryan Housel f6d144c151 Improvements, and simplify code
* don't worry about deep copying, because immutability
* don't need `attrs` parameter which is usually empty
* don't worry about resetting `v` entity version
2015-01-01 22:49:44 -05:00
Bryan Housel dae0d2d55e Add entity copy methods 2014-12-28 22:00:55 -05:00
Bryan Housel b9ac4b95d1 Connection.loadFromURL was swallowing all the errors instead of passing them along 2014-12-17 21:39:48 -05:00
Bryan Housel 4088f2e70a properly load changed entities into altgraph and produce diffs. 2014-12-05 11:15:45 -05:00
Bryan Housel 1c3d198b96 add force option for rebase to overwrite existing entities
related: openstreetmap/iD#2467
2014-12-04 19:50:32 -05:00
Bryan Housel 7c458513f3 Don't pass extra arguments from map to Entity initializer
fixes #2465
2014-12-02 22:14:31 -05:00
Bryan Housel c6ca68ce80 create feature _cache to store matches per entity
also remove old commented code
2014-11-08 00:19:36 -05:00
Bryan Housel 2f6004fcfa performance tuning work-in-progress
* store entity's matched features in a graph transient
* replace fn calls to get commonly used _keys and _hidden arrays
* replace lodash calls with faster for loops (in some places)
* always pass graph/resolver as a param
2014-11-05 00:27:14 -05:00
Bryan Housel dcc9812986 prevent most operations on things connected to hidden features.. 2014-10-28 21:37:02 -04:00
Bryan Housel b0841c1eda missing memo argument (fixes #2421) 2014-10-23 22:21:17 -04:00
Sajjad Anwar dffeedffc9 Moved area-keys to data, and process it during runtime 2014-10-23 15:52:29 -07:00
John Firebaugh 241400faf9 Fix build 2014-10-13 16:55:15 -07:00
John Firebaugh a7fb35663c Optimize Way#area 2014-10-13 16:46:32 -07:00
John Firebaugh 69af20e44d Add mutating extent extend, for performance 2014-10-13 16:34:38 -07:00
John Firebaugh 5f1e40561a Fix performance regressions in tree.js (fixes #2396) 2014-10-13 16:34:38 -07:00
Bryan Housel a8840a1075 Better presets for running, motor, non-motor race tracks
closes #2330
2014-08-22 12:34:39 -04:00
John Firebaugh 362d1b4a58 Add preset for amenity=bureau_de_change (fixes #2309) 2014-07-29 14:24:04 -07:00
John Firebaugh 4994566f57 Fix nodeValue deprecation warnings 2014-07-20 16:05:08 -07:00
Bryan Housel 47aa28dc98 man_made=pipeline doesn't imply oneway
thread: https://lists.openstreetmap.org/pipermail/tagging/2014-June/017944.html
2014-06-21 15:20:05 -04:00
Bryan Housel 0c5f563a26 add test for iD.Entity.layer(), fix spelling of man_made. 2014-06-09 23:39:16 -04:00
Bryan Housel 97b189b397 Precreate fixed number of layergroups between -10, 10 2014-06-09 21:20:50 -04:00
Bryan Housel 849363ff8c Group by layer to correctly depth sort lines.. 2014-06-06 16:10:37 -04:00
Bryan Housel 5ee391dd52 Better layer sorting to fix z-depth issues.. 2014-05-30 15:20:36 -04:00
John Firebaugh 38b821bdea Limit imagery_used tag to 255 characters (fixes #2181) 2014-05-28 17:04:49 -07:00
John Firebaugh c0db8b8e67 jshint 2014-05-27 14:42:15 -07:00
John Firebaugh 0c09871c4a Don’t show turn restriction editor for non-highways (fixes #2240) 2014-05-27 14:35:57 -07:00
Bryan Housel 10bd86cb45 Check single source for implied onewayness #2220 2014-05-23 17:07:11 -04:00
Bryan Housel b8501bcf89 iD.Way.isOneWay should return false if oneway=no #2220
i.e. overrides implied oneway tag like `highway=motorway` or `junction=roundabout`
2014-05-20 00:14:23 -04:00
Bryan Housel a757142146 Rename "Entrance" as "Entrance/Exit" and add parking_entrance preset. 2014-05-19 15:39:16 -04:00
Bryan Housel d245121b19 Fix isConvex() to correctly test the angle that closes the way. 2014-04-23 14:12:20 -04:00
Bryan Housel 210e7889a1 Factor makeConvex into new method, fix missing comma and style issues.. 2014-04-14 23:54:03 -04:00
Bryan Housel a928d4894d Add isConvex() to iD.Way.. 2014-04-10 11:00:13 -04:00
Bryan Housel 9fade58d85 add picnic area stuff: firepit, picnic_table, bbq 2014-03-19 17:33:28 -04:00
John Firebaugh 8e96752039 barrier=fence shouldn't be an area (fixes #2158) 2014-03-16 22:05:18 -07:00
John Firebaugh f6b7acf9ed Remove conditional that's always true
The base graph never has any ownProperty entities.
2014-02-25 10:03:48 -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 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
tyr b71c98cfca protect against relation loops, part 2. fixes #2096 2014-01-10 11:12:10 +01:00
John Firebaugh 1561c366be Update OSM.org links 2014-01-08 16:29:00 -08:00
John Firebaugh 089924ac38 Remove unused variable 2014-01-06 16:26:55 -08:00
John Firebaugh 4bf21cbc8a Restore deleted nodes that are discovered to have extant parents
This bug has existed since 1.0!

Fixes #2085
2014-01-06 16:23:15 -08:00
John Firebaugh 354ef9df44 Clock preset 2014-01-03 13:31:02 -08:00
John Firebaugh 7bbca76a20 Protect against relation loops (fixes #2072) 2014-01-02 17:42:57 -08:00
MaltaProject f1cceceec7 Added craft presets 2013-12-13 16:07:31 -04:00
Adam Solove 2213b072dd Clean up and test relation sorting code. 2013-12-10 22:39:37 -05:00
MateoV c7ebf2d754 aerialway & piste presets 2013-12-05 16:35:29 -05:00