Commit Graph

1254 Commits

Author SHA1 Message Date
Bryan Housel
247900f727 Change several of the event things, remove numeric index
re: https://github.com/openstreetmap/iD/issues/5558#issuecomment-445307568
2018-12-07 16:54:32 -05:00
Huon Wilson
dd0be84da4 Add one-sided triangular markers to ways with sides (e.g. natural=cliff).
This generalizes the oneway arrow logic for adding SVG markers along a
line. Using that functionality, certain tags get arrows on their
right-hand side, indicating which side is "inside", e.g. the
right-side of a cliff is the lower side.

The list of tags considered to be sided (unless there's a
two_sided=yes tag) is:

- natural=cliff
- natural=coastline
- barrier=retaining_wall
- barrier=kerb
- barrier=guard_rail
- barrier=city_wall
- man_made=embankment

The triangles attempt to be reminiscent of the triangles used for
rendering cliffs on OSM (and elsewhere). The different tags get
different renderings (e.g. colors that match the main way, and
different spacings). In addition, natural=coastline is special-cased
to have blue markers (despite having a green way), to emphasise that
the "inside" of a coastline is the water.

Fixes https://github.com/openstreetmap/iD/issues/1475.
2018-11-28 01:45:50 +11:00
Huon Wilson
f356c6ac49 test: add tests for adding oneway arrows to lines 2018-11-28 01:25:04 +11:00
Bryan Housel
9341e477a6 Merge remote-tracking branch 'origin/master' into brand-name-protection 2018-11-26 15:27:56 -05:00
J Guthrie
a23c975232 Fix specs 2018-11-24 21:27:20 +00:00
Bryan Housel
ea9e3008a5 addTags() -> setTags() / removeTags() -> unsetTags()
This avoids overriding the `addTags` and `removeTags` objects with functions
2018-11-21 12:59:43 -05:00
Bryan Housel
e3f5aecda9 Remove dataSuggestions and utilSuggestNames
- dataSuggestions was just a reexport of the name-suggestion-index
- utilSuggestNames was a combobox fetcher function used only once by uiFieldLocalized
    Doesn't need to be a util if it's only used once in the code
    and the tests for it were not really that interesting
2018-11-20 21:27:32 -05:00
Bryan Housel
1731ce4651 Partition viewport by tiles, not by pixels
(closes #4297)

The previous approach split the viewport up by pixels, but each time the view
moved, the pixels would change, so it was not a stable selection of the
streetview data, and the markers would fight for position as the user moved
around.

This approach uses utilTiler to partition the view into stable tiles.
2018-11-14 14:48:42 -05:00
Bryan Housel
152022aec4 Use context.keybinding for keybindings that don't change
(closes #5487)
2018-11-13 20:57:21 -05:00
Bryan Housel
bb30cbf555 Move lib/d3.keybinding.js -> util/keybinding.js
almost none of the original d3 "plugin" code remains
2018-11-13 13:42:09 -05:00
Bryan Housel
3bc841e95b Adjust layer ordering to draw touch targets above data layers 2018-11-09 21:48:45 -05:00
Bryan Housel
b7df3eda38 Use new Mapillary API calls for map_features, image_detections
(closes #5374)
2018-11-07 23:09:11 -05:00
Bryan Housel
a29af100df Remove test for unpopular values with a wiki page,
Restore test for unpopular keys with a wiki page
2018-11-07 11:06:48 -05:00
Mateusz Konieczny
e285066032 invert tests for inverted behavior 2018-11-03 15:07:37 +01:00
Mateusz Konieczny
bb054211c0 fix missing negation is specs 2018-11-03 14:26:52 +01:00
Bryan Housel
3e03102731 Simplify unpaved tag class logic, add tests
(re: #5422)
2018-10-31 16:13:03 -04:00
Bryan Housel
4cd442e09d Restore mapillary.js line endings back from CRLF -> CR, fix tests 2018-10-11 13:58:57 -04:00
Bryan Housel
0353b3110d Fix parse error in testing osm.js 2018-10-11 13:58:57 -04:00
Bryan Housel
1ffca3ce85 Switch crossing presets to "marked"/"unmarked", retain "zebra" as unsearchable 2018-10-02 17:01:04 -04:00
Bryan Housel
5368aa1972 Update data layer tests to check for both shadow and stroke paths 2018-08-25 11:30:06 -04:00
Bryan Housel
0f07393fb3 Fix data file tests (in both phantom and real browsers) 2018-08-23 11:11:14 -04:00
Bryan Housel
575c98ab28 Accept both file and vector tile url templates from settings screen 2018-08-21 01:25:24 -04:00
Bryan Housel
4b446e9e78 WIP merge 'gpx' and 'mvt' layers into single 'data' layer 2018-08-17 13:03:07 -04:00
Bryan Housel
2e6799ac60 Don't reverse cardinal direction roles on relations anymore
re: https://github.com/openstreetmap/iD/pull/2004#issuecomment-407995998

Per thread https://twitter.com/bhousel/status/1025805098063208448
JOSM has stopped doing this too
2018-08-04 21:55:14 -04:00
Bryan Housel
89ad643977 Let new note generate its own id, instead of using -1
Also stringify the note id (because existing notes from OSM are this way)
Also make sure comments is initialized as an Array not an Object
Also clarify some of the tests
2018-07-24 14:11:08 -04:00
Thomas Hervey
e1cb25d824 merge from 'master' 2018-07-23 18:24:02 -04:00
Thomas Hervey
26f045b16c added/updated service/osm, osm/note, mode/add_note tests 2018-07-23 16:17:48 -04:00
Bryan Housel
119792fd22 Cleanups to Detach Node feature
This commit includes a bunch of minor things:
- change keyboard shortcut to 'E' to not conflict with anything
- move `disabled` check from operation into action and simplify
- use `actionMoveNode` to place the detached node at the mouse cursor
- disable the operation if the node is connected to hidden features
- lots of code simplification
- make the icon more centered
2018-07-23 13:36:34 -04:00
Bryan Housel
94b0affe8c Merge branch '4320' of https://github.com/Psigio/iD into Psigio-4320 2018-07-23 08:44:19 -04:00
Jon D
90bc0b8537 Update to prevent detachment of node when either a via or
location_hint role in a turn restriction.
Update to move any other relation to new node.
2018-07-22 19:35:29 +01:00
Bryan Housel
2fa593421f Rename scaleExtent to zoomExtent, slightly simplify getTiles() 2018-07-22 01:15:44 -04:00
Thomas Hervey
baad5f0cc5 added tests for osm/note 2018-07-21 21:44:07 -04:00
Bryan Housel
4c9ef45448 Merge pull request #5149 from vershwal/mvt_test
Some mvt tests.
2018-07-17 01:15:28 -04:00
Bryan Housel
73d0f30453 Merge branch 'notes' 2018-07-16 16:59:35 -04:00
vershwal
213fa3706d Created new file for pbf test in test/data. 2018-07-16 22:10:59 +05:30
Thomas Hervey
7ad765d408 added simple tests for loading and retrieving notes 2018-07-16 10:54:40 -04:00
vershwal
0b32f4c4ee Some mvt tests. 2018-07-15 22:20:43 +05:30
Thomas Hervey
bd1586500e added tests for notes service 2018-07-13 15:01:43 -04:00
Bryan Housel
4fda478f57 Merge branch 'check' of https://github.com/vershwal/iD into vershwal-check 2018-07-09 09:32:15 -04:00
Bryan Housel
de12396654 Fix projection so the map is where the point is
Also remove gj redundancy
2018-07-08 00:50:26 -04:00
Bryan Housel
ef771211b7 Merge branch 'gpxtext' of https://github.com/vershwal/iD into vershwal-gpxtext 2018-07-07 23:28:48 -04:00
Jon D
dd3de593ca Add tests for Detach Node operation 2018-07-07 11:34:14 +01:00
Jon D
3bad09d497 Merge Work-In-Progress 4320 to 4320 2018-07-06 22:20:19 +01:00
Bryan Housel
416ae66f71 Support more direction tags for reversal in Reverse action
(closes #5121)

This commit also refactors some of the logic to make it simpler and more efficient
(removes lodash _transform too) and updates the comment that was out of date.
2018-07-05 14:47:56 -04:00
Tom Hughes
d617d9c588 Fix wikipedia UI tests to mock XHR instead of JSONP 2018-07-04 17:07:27 +01:00
vershwal
73ac628880 gpx tests. 2018-07-04 19:56:51 +05:30
Bryan Housel
535208beb5 Move tests to spec/services/osm.js and remove old notes.js files 2018-07-01 23:35:10 -04:00
Bryan Housel
9517635d4d Merge branch 'master' into notes 2018-06-29 21:54:24 -04:00
Bryan Housel
76d21c8293 stub test/spec/svg/gpx.js 2018-06-29 02:23:42 -04:00
Bryan Housel
3943364852 Merge pull request #5106 from openstreetmap/remove_test_user_mocks
removed: user mocks from image service test specs
2018-06-26 21:11:23 -04:00