Commit Graph

36 Commits

Author SHA1 Message Date
Kushan Joshi 6ef52256f3 Migrating to lodash v4 2016-05-17 12:37:25 +05:30
Bryan Housel c4fbacd625 Rename major_roads -> traffic_roads, minor_roads -> service_roads 2016-03-05 23:58:09 -05:00
Bryan Housel 3ef05cad79 Move highway=unclassified to major_roads feature filter 2016-03-05 23:31:02 -05:00
Bryan Housel 63ab1e1267 Adjust matching rules for multipolygon members (closes #2887) 2016-01-04 12:07:12 -05:00
Bryan Housel 46a642ac96 WIP for 2887, and perf improvements (avoid unnecessary caching) 2015-12-31 21:03:03 -05:00
Bryan Housel 226b73fd48 Don't call childNodes unless necessary (avoid extra _childNodes caching)
`hasHiddenConnections` was calling it for all features, inluding points and
vertices, causing _childNodes to have a lot of unnecessary keys added to it.
2015-12-22 12:03:08 -05:00
Bryan Housel 58cb66f472 Add highway=corridor and universal level field
For now, `highway=corridor`:
  * styled like highway=pedestrian
  * and matches 'paths' feature filter.

(closes #2687, closes #2218)
2015-06-30 22:02:22 -04:00
Bryan Housel 05ff86e5c2 Prevent no-match parent relations from breaking getMatches
(e.g. a site relation with a fence in it)
Also, updated the test graph to contain one of these.
see https://github.com/openstreetmap/iD/pull/2554#issuecomment-78517442
2015-03-12 13:59:48 -04:00
Bryan Housel 3308b5507b Feature Filtering: don't match multipolygon lines as 'others'
(fixes #2548)

If the entity is a way that is a member of a parent relation,
use that parent relation's matches instead of matching 'other'
2015-03-10 00:06:29 -04:00
Bryan Housel 848d19a116 Don't cache array lengths
see https://github.com/openstreetmap/iD/pull/2489#discussion_r22489237
2015-03-09 18:02:05 -04:00
Bryan Housel 29e1554d5f accessor to expose _features internals 2015-02-26 16:08:39 -05:00
Bryan Housel 3e391e87df don't try to call Entity#geometry for midpoints 2014-11-21 10:58:32 -05:00
Bryan Housel dfe8fd1e90 features performance enhancements
1. reusue entity.geometry where possible
2. cache entity parents
2014-11-18 22:05:08 -05:00
John Firebaugh d444c907e8 Style 2014-11-11 15:12:08 -08:00
John Firebaugh 916a901b8f Show all features as auto-hidden when map is not editable 2014-11-11 14:16:16 -08:00
Bryan Housel 2024e2333d Exit select mode if selected DOM elements have disappeared 2014-11-10 23:23:28 -05:00
Bryan Housel af3c307b17 cache invalidation and naming things 2014-11-10 22:47:07 -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 d5879fa855 reuse _stats, don't count vertices and relations 2014-11-06 23:04:25 -05:00
Bryan Housel 55e6f9ec93 faster tests for certain geometry (vertex, point) 2014-11-06 12:54:58 -05:00
Bryan Housel 0d6d4b3d24 remove footer "features hidden" warning in editOff 2014-11-06 00:33:45 -05:00
Bryan Housel 788dedc595 more performance improvements for feature filters
* use named filter functions for easier profiling
* remove some unnecessary line/area geometry checks
* replace some lodash code with for loops
* reorder some tests to put cheap condition early
2014-11-06 00:18:45 -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 c941bd5a4b 2 things related to gatherStats auto-hiding..
* skip gatherStats on differenced redraws..
* force full redraw when gatherStats autohides/unhides features
  (before: extent redraws would happen, counts would update,
   but buildings/points would stay on the screen)
2014-10-31 11:58:02 -04:00
Bryan Housel 6b31eab5a7 Deselect features that are hidden.. 2014-10-30 15:01:03 -04:00
Bryan Housel b20f1495de restore toggle function and add test 2014-10-29 15:06:43 -04:00
Bryan Housel 927c533bb4 add feature tests for auto-hiding 2014-10-28 21:37:04 -04:00
Bryan Housel 43f1cdd3eb decoupled graph from context for better testing
fixed feature matching tests for vertices and relations
2014-10-28 21:37:04 -04:00
Bryan Housel 2b260f9a6c added tests for feature filtering
(some tests failing because I need to decouple graph from context)
2014-10-28 21:37:04 -04:00
Bryan Housel 6b6ca8d523 initial checkin of features unit tests 2014-10-28 21:37:04 -04:00
Bryan Housel 7d9b267858 Show auto-hidden features as disabled checkboxes with tooltip
also rearrange map data panel to put features last
2014-10-28 21:37:03 -04:00
Bryan Housel a085ce6dc8 Don't hide features that the user just created 2014-10-28 21:37:03 -04:00
Bryan Housel 9666af30c6 better point/building culling based on viewport size 2014-10-28 21:37:03 -04:00
Bryan Housel e761414a15 'Rail' feature filter should not match if it is also a highway. 2014-10-28 21:37:02 -04:00
Bryan Housel dcc9812986 prevent most operations on things connected to hidden features.. 2014-10-28 21:37:02 -04:00
Bryan Housel 8fd177935d Feature filtering (in progress)
(rebased to master post-Mapillary merge)
2014-10-28 21:37:00 -04:00