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
2ffcec965a
Don't snap notes to OSM elements
...
(closes #5191 )
2018-11-12 17:23:38 -05:00
Bryan Housel
eba115803a
Variable cleanups in behavior and modes
2018-09-06 09:50:26 -04:00
Bryan Housel
cc938698e8
Add ability to select custom data
2018-08-25 11:14:04 -04:00
Bryan Housel
0a82ab125e
Add uiDataEditor for inspecting custom map data
2018-08-25 10:10:04 -04:00
Bryan Housel
a9aca707b6
Support hovering on data features
2018-08-25 00:04:52 -04:00
Thomas Hervey
06a410107b
cleaned up merge relics and comments
2018-07-20 23:31:49 -04:00
Thomas Hervey
a6bdbcabb2
merged from
2018-07-20 23:21:24 -04:00
Thomas Hervey
fbedbb1608
select note before rendering sidebar
2018-07-20 23:17:41 -04:00
Thomas Hervey
bf9b19359a
WIP drag note
2018-07-20 21:41:44 -04:00
Thomas Hervey
24579b15bc
WIP testing new drag_notes mode
2018-07-20 14:26:02 -04:00
Thomas Hervey
14212b47fe
WIP: drag note
2018-07-19 15:21:46 -04:00
Thomas Hervey
73ee5c2fc9
fixed select_note mode, cleaned note_editor, TODO: enable note save
2018-07-03 22:45:51 -04:00
Bryan Housel
bf499d9438
Restore modeSelect, and make a new modeSelectNote just for the notes
2018-07-03 18:11:59 -04:00
Bryan Housel
b14d1b5061
resolve conflicts, fix a few minor bugs prob caused by merging:
...
- don't insert multiple times into the rtree in `services/osm.js`
- use `d.id` instead of `d.key` as the key in `svg/notes.js`
2018-07-03 16:40:07 -04:00
Thomas Hervey
8121f585d5
added checks for multiclick and click on notes
2018-07-03 15:39:22 -04:00
Thomas Hervey
2c22fe00a2
updated: hacky note hovering; todo: complete note click handling
2018-07-02 10:44:47 -04:00
Thomas Hervey
1b06dbd8c9
delete: demo select file (unintentional commit)
2018-06-29 23:36:11 -04:00
Thomas Hervey
737ccfcfba
updated: siebar displays note details on hover (via svg)
2018-06-29 14:43:01 -04:00
Bryan Housel
470835b38f
Extract all graphics from iD sprite, reassemble with svg-sprite
...
All iD sprite graphics are now prefixed with `iD-`
Also includes support for sending the preset logos to taginfo
2018-06-08 16:06:46 -04:00
Bryan Housel
61c7f64077
Remember changeset source, make it settable via url param
...
(closes #4899 )
2018-03-16 09:20:32 -04:00
J Guthrie
d35494d003
Can finish drawing when cursor is in invalid position
...
- When drawing an Area, the leading edge is allowed to temporarily be in an invalid position (see #4655 )..
.. Finishing a drawing is disabled if doing so would close with the invalid leading edge
2018-03-08 02:53:03 +00:00
Bryan Housel
24eba5c1b0
Preventing snapping at viewport edge also prevented finishing ways
2018-01-20 22:45:03 -05:00
Bryan Housel
f0a27bc1ec
Simplify way segmentation and fix bug with adjacent segment type
...
(closes #4669 )
Now instead of creating MultiLineString targets, we just create a bunch of
LineString targets. This makes the code simpler, and anyway the entity is
still there in `properties` for drawing code to decide what to do with the target.
Incidentally, this change allows iD to support an extrusion operation.
(Because each way segment has its own unique GeoJSON target now)
2018-01-09 10:12:29 -05:00
Bryan Housel
e661281e38
Prevent self intersecting lines without a junction node
...
(closes #4646 )
2018-01-08 19:17:50 -05: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
58eaca2aa0
Ignore area closing segment during move when validating geometry
...
(closes #4655 )
2018-01-08 12:09:17 -05:00
Bryan Housel
ddaa828ec9
Handle both target GeoJSON and osmEntity in hover
...
(fixes test and allows hover on the area fills again)
2018-01-01 22:53:40 -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
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