Commit Graph

55 Commits

Author SHA1 Message Date
Quincy Morgan
09ec7ea802 Remove redundant line preset icons
Fix lint errors
2019-02-13 13:28:34 -05:00
SilentSpike
214cf41019 Use more generic classes for errors 2019-02-01 22:50:57 +00:00
SilentSpike
4d89810721 Add ImproveOSM service
Only processing one-way errors for now
2019-02-01 22:50:54 +00:00
Bryan Housel
fadd8e2e8a Switch KeepRight markers to use touch targets
This makes it easier to select the KeepRight issue and avoid selecting
the OSM geometry underneath them
2019-01-04 21:17:38 -05:00
Bryan Housel
cd9203975d Use touch targets for notes, fix a few bugs with note dragging
(closes #5213)
2019-01-04 15:48:39 -05:00
Thomas Hervey
1335549ad3 cleaned map data UI; commented sub-layer filtering 2018-12-19 13:43:08 -05:00
Bryan Housel
2e6652f8cb Fix oneway and sided markers for IE11/Edge 2018-11-30 15:57:16 -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
Bryan Housel
cc71f924f3 Fix stacking order in turn restriction editor 2018-11-09 22:54:07 -05:00
Bryan Housel
3bc841e95b Adjust layer ordering to draw touch targets above data layers 2018-11-09 21:48:45 -05:00
Quincy Morgan
b24256973f Makes relation members highlighted via hovering on list items more prominent 2018-10-13 23:04:35 -07:00
Bryan Housel
48e233e4a3 Move some css rules around, add hash and geometry.type to css classlist 2018-08-24 10:39:03 -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
0334e7b353 Visibility stuff
- Draw ellipse below note shadow
- Use brighter color for new note
- Use thicker stroke for note shadow (same width as point)
2018-07-24 00:16:37 -04:00
Thomas Hervey
e23ef4ba4a redraw on note drag. TODO: change dispatch call 2018-07-23 15:09:25 -04:00
Thomas Hervey
373353f40d added breathe behavior & cleaned hover/select styling on notes 2018-07-21 15:54:47 -04:00
vershwal
eb8bf19b78 button appeared 2018-06-18 01:21:06 +05:30
Bryan Housel
749357eb03 Fix fills for preset icons, remove iD sprite and idraw files
(closes #3924)
2018-06-08 23:10:07 -04:00
Bryan Housel
104e8cea5c Adjust color for better visibility 2018-02-20 16:16:10 -05:00
Bryan Housel
7559ff68df Highlight all the paths when hoving on the from 2018-02-20 15:45:44 -05:00
Bryan Housel
bbeb34626b Show really thick path shadows in the turn restriction editor 2018-02-20 10:47:03 -05:00
Bryan Housel
200098dff9 Render restriction paths with red/green/blue shadow 2018-02-19 21:30:47 -05:00
Bryan Housel
6570365413 Use dark halo around text, switch to svgPath to get viewport clipping 2018-01-23 00:29:07 -05:00
Bryan Housel
34c170f6ca Merge pull request #4678 from nnodot/increase-gpxlabels-readability
Increase GPX labels readability
2018-01-22 23:32:43 -05:00
Bryan Housel
b0cba113e9 Fix directional vertices on IE11/Edge
(closes #4710)
2018-01-19 20:32:45 +00:00
Nicolas Decoster
c796a9de12 Increase GPX labels readability 2018-01-10 15:42:56 +01:00
Bryan Housel
ea9643e08b Allow Alt/option key to disable geometry check and nope cursor
(re: #4646)
2018-01-08 15:47:29 -05:00
Bryan Housel
6881205d43 All touch targets are GeoJSON now
This makes the code a bit more consistent and lets us avoid some
hacky and probably non-performant things:
- abusing CSS classes in the draw/drag datum functions (classed `.target`)
  (is this thing target? just check d.properties)
- regexing the id for `-nope$`
  (is this thing a nope target? just check d.properties)
- using context.hasEntity to get a the real entity
  (is this thing a real osmEntity? just check d.properties)
- fixes code like the restriction editor which uses fake ids for split ways
2018-01-01 22:37:10 -05:00
Bryan Housel
fa7a6ebb12 Snap to nope line targets too, also remove svgBlocker, not needed
(it's easier to just class the surface, and won't interfere with snapping)
2017-12-27 22:51:36 -05:00
Bryan Housel
009d7b0d65 Add layer blocker and polygon self-intersection geometry check 2017-12-24 09:21:59 -05:00
Bryan Housel
5d9b051f84 Fix drag_node for touch targets and line snapping 2017-12-21 20:31:20 -05:00
Bryan Housel
f58349864c Add support for nope targets, line sub-segment targeting 2017-12-20 13:52:16 -05:00
Bryan Housel
7a8f50c74e More fixes for drawing/snapping, don't draw touch targets for activeIDs 2017-12-18 22:54:49 -05:00
Bryan Housel
aa68b21d7a Add touch targets for line/area 2017-12-17 22:53:58 -05:00
Bryan Housel
5e99f3cbac CSS pointer-events cleanup, also round linejoins 2017-12-16 11:32:26 -05:00
Bryan Housel
5a4faa84a1 Fixed some of the point/vertex/midpoint snapping issues
Still working on snapping to lines/areas, and making sure drawing lines/areas
will complete
2017-12-16 01:33:12 -05:00
Bryan Housel
5cb5456869 Implement touch targets for midpoints and points 2017-12-15 22:50:55 -05:00
Bryan Housel
89d8d37576 Drawing all the correct vertices now where I want them, simplify classes
Some highlights
- `getSiblingAndChildVertices` are expensive, so they're saved and called less frequently
- draw touch targets for all the visible vertices
- remove redundant css classes and `setClass` function
2017-12-15 17:28:20 -05:00
Bryan Housel
ba5b3eee9c More work on vertex drawing, add debug for touch targets 2017-12-15 00:26:37 -05:00
Bryan Housel
b9e48d1682 WIP: Move layer-hit to layer-points with explict sublayers, update tests
This is more work to further isolate the layers that entities draw to.
It makes it easier to debug what is going on, and can eventually lead to
deferred drawing, if each draw function is in its own place and not dependant
on anything else.

I've started to replace the vertex-hover with an explicit layer for touch
targets.

Also had to change a lot of the svg tests, which are really brittle.
Things would happen like - the surface would be created, it would kick of a
deferred redraw, which would notice that the zoom was 0 and call
editOff, which would remove the osm layers that were just created and
that the tests were trying to draw to. These tests need proper zoom and
projection otherwise nothing works.
2017-12-14 17:38:43 -05:00
Bryan Housel
bfaf17538e Move text to single group with subgroups for halo,label,debug 2017-12-14 12:32:28 -05:00
Bryan Housel
d9e3367836 More improvements to label vertex avoidance
(re: #4271, #3636)

- better classification of "interesting" vertices
  (include tagged, selected, or child of selected)
- now we can draw labels on selected lines again (revert #3636)
  because the labels will avoid the vertices
- if debugging is on, draw a collision box for the mouse
2017-12-13 18:05:06 -05:00
Bryan Housel
899abc7ef5 WIP to render vertices while dragging
(re: #3003 / #4602)

For now, drawHover is commented out.  Still not sure what I will do with it.
This means that things flicker a bit when dragging, also connecting nodes
(and closing lines) does not currently work.

There was lot going on preventing the vertices from rendering while dragging.

1. `modeDragNode` needed a proper `selectedIDs()` function that works like other
modes.. Many other places in iD (including the vertex renderer) call `context.selectedIDs()`..
This means that `modeDragNode` needs a new function `restoreSelectedIDs()` to do what
`selectedIDs()` was previously doing (a place to store selectedIDs so that we
can reselect those entities after the user is done dragging a node in select mode)

2. Just so many things in svg/vertices.js
  - siblingAndChildVertices was missing some things for points that we render
    as vertices (points in wireframe, points with directions)
  - the sibling vertices weren't being included in the `filter` function, so
    would disappear when doing differenced/extent redraws
  - probably some other things
2017-12-12 17:39:36 -05:00
Bryan Housel
6aba27c84a Display directional vertex with a viewfield, not an arrow 2017-12-08 14:29:56 -05:00
Bryan Housel
b79b6ca97a Support rendering direction on vertices (stop sign, traffic_signals, etc)
(closes #3815)
2017-12-07 22:48:03 -05:00
Bryan Housel
af31cf5eb5 Fix spacedraw drawing, make clicking less touchy
(closes #3986)

Root cause was the vertex shadow strokes were too big, esp on endpoints.
For normal lines 16px stroke width centers on the line, but for vertices
it extends beyond the vertex radius, stealing clicks.

Also switched some "globals" to module variables in draw.js
2017-04-26 16:37:15 -04:00
Bryan Housel
3d762b58f6 Add an ellipse to resolve point ambiguity when dragging
(closes #3536)
2017-04-26 02:08:54 -04:00
Bryan Housel
6de6056c66 Don't hover sidebar or vertices when alt key disables snapping
This makes it a little more clear that the alt key is doing its job
2017-04-23 11:11:16 -04:00
Bryan Housel
7548b62918 Fix many more rtl styles for raw tag editor, etc 2017-03-22 01:26:12 -04:00