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
96afbbd785
Refactor vector math functions from geo.js to vector.js
2017-12-28 01:08: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
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
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
f58349864c
Add support for nope targets, line sub-segment targeting
2017-12-20 13:52:16 -05: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
18c97d52c8
Extract viewport nudging code from several places to geoViewportEdge
2017-12-18 09:50:17 -05:00
Bryan Housel
aa68b21d7a
Add touch targets for line/area
2017-12-17 22:53:58 -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
ba5b3eee9c
More work on vertex drawing, add debug for touch targets
2017-12-15 00:26:37 -05:00
Bryan Housel
f247bd1e66
Move icon code into uiFlash, default flash icon to icon-no
...
Previously it was up to the caller to draw whatever they want into the
footer flash. With this change, uiFlash creates an icon and a text, so
the caller doesn't need to do as much work.
2017-12-05 23:41:34 -05:00
Nikita Mashukov
edc30ad41c
no prevent the copy event when there is selected text
2017-10-20 20:20:42 +07:00
Bryan Housel
75d2c45fd6
Convert lodah-es and d3 to named imports for behaviors
2017-09-24 21:43:54 -04:00
Bryan Housel
a42aa789e9
Add hashtags API parameter and localStorage
...
(closes #2834 )
2017-08-16 10:47:17 -04:00
Bryan Housel
163323d3df
Make sure bool url params actually contain value 'true'
...
(closes #4222 )
2017-08-08 09:51:57 -04:00
Bryan Housel
6ca649498f
Add walkthrough=true url parameter to auto-start the walkthrough
...
(closes #4111 )
2017-06-22 22:26:38 -04:00
Bryan Housel
e9568e8845
Don't exit drawing mode on hashchange unless the user has moved a lot
...
(Switching background while drawing a line was causing the line to get
cancelled because of returning to browse mode)
(closes #4099 )
2017-06-12 02:04:22 -04:00
Bryan Housel
b87be2d241
Don't omit tags when copy/pasting
...
(closes #4067 )
2017-05-30 22:29:29 -04:00
Bryan Housel
ff14dbf944
Allow contextmenu events to work on the sidebar
...
(closes #4036 )
2017-05-12 14:39:41 +01:00
Bryan Housel
0c810aebe4
Fix menu key as right click replacement on Windows
...
(closes #4017 )
2017-05-08 22:03:05 +01:00
Bryan Housel
4ee5d7334b
Fix spacebar drawing and hover in Firefox - don't match active node
...
(closes #4016 )
2017-05-08 01:37:38 -04:00
Bryan Housel
cd09f9dfee
Prevent mouseup from turning into a click
...
Mouseup was turning into a click on whatever was the last thing clicked.
In this walkthrough, this would sometimes be the "Add Area" mode button,
which would re-enter the add area mode and throw away the user's drawing.
(I have no idea why.)
2017-05-07 22:44:42 -04:00
Bryan Housel
a18d690dd5
Don't let window.location changes happen during draw modes
...
(closes #3996 )
2017-05-03 17:15:35 -04:00
Bryan Housel
651ec363f6
Undo/Redo while drawing line/area should keep the user in drawing mode
...
(closes #3530 )
2017-05-03 16:08:23 -04: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
5ca4246a6d
If drawing a way, don't hover on a node that was just placed
...
(closes #3974 )
2017-04-26 13:33:21 -04:00
Bryan Housel
49c087d51f
Rename delegate->selector, adjust formatting, drop userselect polyfill
2017-04-25 16:51:12 -04:00
Bryan Housel
149cbbe350
Fix hover tests
2017-04-24 10:05:02 -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
06caeb87b7
Correct lodash _.omit usage
...
(closes #3965 )
2017-04-22 23:05:15 -04:00
Bryan Housel
a5554cf3b0
Expire saved changeset comment older than 2 days
...
(closes #3947 )
2017-04-21 23:01:32 -04:00
Bryan Housel
8989aea023
Clicking a midpoint should be treated as a click on the parent way
2017-04-14 00:38:04 -04:00
Bryan Housel
7da34f474b
Pacify eslint
2017-03-29 12:50:29 -04:00
Bryan Housel
7873f0c425
Relax rules for using keyboard shortcuts in the walkthrough
2017-03-29 12:35:33 -04:00
Bryan Housel
d949fe08cb
Fix faulty datum test from 681ee5a
2017-03-22 16:01:14 -04:00
Bryan Housel
681ee5a89a
Prevent crash when missing datum
...
(This can happen if the user mouseups on a tooltip, e.g. in walkthrough)
2017-03-22 10:27:15 -04:00
Bryan Housel
31d2733c2a
Remove unused mode variable - eslint
2017-03-22 02:51:47 -04:00
Bryan Housel
d664f74832
When changing selection, always update the url hash
2017-03-21 14:20:25 -04:00
Bryan Housel
af757d31be
General usability improvements
...
* Reevaluate all featuers stroke widths for shadow, casing, stroke
* Shadow width is important to make sure all features are easily clickable
* Casing width is important to see oneway arrows
* Make sure all line styles have normal and low-zoom variants
* Show directional arrows for all waterway types
2017-03-16 16:16:35 -04:00
Bryan Housel
f291b0a120
Remove ineffective attempt to grab focus
2017-02-22 22:32:19 -05:00
Bryan Housel
dc2318ab63
Add mention of the right-click menu in the walkthrough
2017-02-22 17:31:08 -05:00
Bryan Housel
f7c3de9545
Preserve backward compability with radial menu
...
Old menu behavior can be restored with 2 cookies:
- `edit-menu-style=radial` - Display menu as a radial menu, limited to 8 items
- `edit-menu-show-always=1` - Show menu on all clicks, not just contextmenu/right
2017-02-22 16:50:42 -05:00
Bryan Housel
4f8d772397
More improvements to select behavior re contextmenu, shiftclick, etc.
2017-02-21 22:16:17 -05:00
Bryan Housel
e756520bd8
suppressMenu(true) is now the default
2017-02-21 15:47:22 -05:00
Bryan Housel
3908da03cf
Fix styling of flash and footer and use absolutely positioned divs
...
Also fix flash tests
2017-02-17 00:23:24 -05:00