Commit Graph

10308 Commits

Author SHA1 Message Date
Brian Davidson d02a880d8a Lower the z-index 2017-12-29 18:58:49 -05:00
Bryan Housel 1bd41b894c Add direction tagging to intro graph for walkthrough 2017-12-29 16:04:03 -05:00
Bryan Housel 35f8d56249 Update direction fields and add to several presets 2017-12-29 01:25:45 -05:00
Bryan Housel 08cd2c7325 Tests for geoHasSelfIntersections 2017-12-28 23:46:08 -05:00
Bryan Housel 4f02340374 Extract self-intersection code to geoHasSelfIntersections
Test for self-intersecting areas in both drag_node and draw_way
2017-12-28 23:10:52 -05:00
Bryan Housel 462fef148d Remove unused imports (eslint warning) 2017-12-28 21:20:14 -05:00
Bryan Housel 7af73c10ef Refactor geometric math functions from geo.js to geom.js 2017-12-28 01:28:38 -05:00
Bryan Housel 96afbbd785 Refactor vector math functions from geo.js to vector.js 2017-12-28 01:08:11 -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
ajlomagno 5d3df25960 Moved cleanuo code to exit function in welcome.js 2017-12-27 13:19:22 -05:00
Bryan Housel 6d9e028a56 Update rollup to v0.53.0 2017-12-26 22:45:12 -05:00
Bryan Housel c1d1c63033 Update d3 to v4.12.2 2017-12-26 22:40:59 -05:00
greenkeeper[bot] e430be407e chore(package): update mapillary-js to version 2.10.1 2017-12-26 22:36:24 -05:00
greenkeeper[bot] 052d2a39bb fix(package): update marked to version 0.3.9 2017-12-26 22:36:02 -05:00
greenkeeper[bot] 4622b1d489 fix(package): update rbush to version 2.0.2 2017-12-26 22:34:11 -05:00
ajlomagno 81910d4f27 Fixed click counter persisting 2017-12-26 15:12:11 -05:00
Bryan Housel ee617779a4 Snap to nope targets too (snapping is useful feedback)
Also remove "acting" cursor, which was overriding the no-action
cursor in some situations.
2017-12-25 23:11:00 -05:00
Bryan Housel 009d7b0d65 Add layer blocker and polygon self-intersection geometry check 2017-12-24 09:21:59 -05:00
Bryan Housel 9fbb4d350f Add geoVecEquals for strict comparisons 2017-12-23 22:33:35 -05:00
Bryan Housel d6e8ca2a1c Transitioned bouncebacks when user drags node onto a nope 2017-12-22 21:06:44 -05:00
Bryan Housel 117ad7d6b6 Transitionable actionMoveNode 2017-12-22 16:57:27 -05:00
Bryan Housel 64a11f4cbf Restore ability to extend line at beginning or end 2017-12-22 15:08:05 -05:00
Bryan Housel fc680545ad Don't dispatch drag start and move together
Drag start is responsible for switching into drag mode, classing
stuff as `active` and kicking off a bunch of other things.

If the drag move happens immediately after this, and includes the
target from the initial active drag, it can cause weird snapping
from the dragnode to its own parent way.  (Happened if the user did
a very fast drag from the node along the parent way just next to it)
2017-12-22 13:58:27 -05:00
Bryan Housel be00a526b6 Make sure all targets are redrawn during a mode change
There was an issue where the lines did not redraw their targets right away
when entering drag node, which could make it possible for a quick drag node
to try to connect to its parent line.  With the chooseEdge exclusion it
would not connect to the parent nearby, but in another weird part of the line.
2017-12-22 11:42:21 -05:00
Bryan Housel 7851c49e80 Fix nopefilters by testing the original id for the filter 2017-12-22 00:26:39 -05:00
Bryan Housel 2be62fffe5 All the complicated code in drawWay can be removed
Now that we can target specific segments along a line, we don't need
temporary drawing objects or extra code to check for self intersections
2017-12-22 00:01:23 -05:00
Bryan Housel 5d9b051f84 Fix drag_node for touch targets and line snapping 2017-12-21 20:31:20 -05:00
Bryan Housel d82d5dc3d0 Add skipID to geoChooseEdge, to ignore dragging node 2017-12-21 17:30:50 -05:00
Bryan Housel fcacdb4400 Fix hover test (requires context.hasEntity stub) 2017-12-21 11:18:06 -05:00
Bryan Housel 6d7659b3bb Refactor common helper code to svg/helpers.js, add area nopes 2017-12-21 10:36:02 -05:00
Bryan Housel f58349864c Add support for nope targets, line sub-segment targeting 2017-12-20 13:52:16 -05:00
Nicolas Decoster 4b98bafec2 Highlight the changeset editor when the comment is empty
(closes #4613)
2017-12-20 18:20:12 +01:00
Bryan Housel 7994baae23 WIP: trying singular activeID and smarter target drawing code
The goal here is that the code that draws the targets should know better
what parts of the lines/vertices are targetable, rather than just
relying on CSS to ignore the pointer events on the whole line.

e.g. when drawing a line, it's ok for it to loop back and connect
to itself, just not on a segment or vertex adjacent to the active
node.
2017-12-19 11:23:35 -05:00
Bryan Housel 563c496a65 Update selected vertices when drawing in select mode
This is a better solution to catching and drawing new verteices that
got added because a user double clicked on a line.
2017-12-19 09:08:59 -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 eafc2b4300 Adjust touch target radii 2017-12-18 17:00:47 -05:00
Bryan Housel 7155ef8bc6 Fix double clicking on a way to create a vertex 2017-12-18 16:09:07 -05:00
Bryan Housel 2e2b037e36 Move a bunch of commonly used vector and projection math functions into geo
- geoVecAdd
- geoVecSubtract
- geoVecScale
- geoZoomToScale
- geoScaleToZoom
2017-12-18 15:05:42 -05:00
Bryan Housel 18c97d52c8 Extract viewport nudging code from several places to geoViewportEdge 2017-12-18 09:50:17 -05:00
Bryan Housel bcd511573f Fix extent in turn restrictions viewer, so vertices will render 2017-12-18 00:34:54 -05:00
Bryan Housel b5eaa76d1a Optimization: when moving stuff around, don't exit/enter nodes
This avoids thrashing the DOM. The positions of the nodes will still
get updated by the update selection.
2017-12-18 00:13:16 -05:00
Bryan Housel 57ba6a9862 Add selectedIDs() for modeMove and modeRotate
This allows the label collision boxes for the vertices to update
during these modes. Otherwise the labels.js `isInterestingVertex()`
function doesn't consider them interesting enough to update.
2017-12-18 00:11:08 -05:00
Bryan Housel aa68b21d7a Add touch targets for line/area 2017-12-17 22:53:58 -05:00
Bryan Housel 8720f7e6d7 Merge pull request #4598 from Jungle-Bus/brewery
Add a field preset for the brewery tag
2017-12-17 12:42:42 -05:00
Bryan Housel a4afa3a15e Merge pull request #4620 from SeanBarber/remove-extra-be
Removed extra 'be' from en.json, en-GB.json, and core.yaml
2017-12-17 12:17:56 -05:00
Sean 4b08ceba90 Removed extra 'be' from en.json, en-GB.json, and core.yaml 2017-12-17 08:29:59 -06: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 9d42d470ca Touch targets can be keyed on entity.id instead of osmEntity.key
to avoid excessive exit/enter flickering
2017-12-15 21:26:58 -05:00