Quincy Morgan
d01bb78707
Reduce circular dependencies caused by importing from indexes, the location of the validation models, and the location of areaKeys ( close #6237 )
2019-04-24 13:45:59 -07:00
Bryan Housel
af45dbce10
Trying to avoid one-off validations when history changes will trigger it
2019-04-05 11:37:02 -04:00
Quincy Morgan
67fc051632
Tweak newFeature in select mode
2019-03-26 16:34:23 -04:00
Bryan Housel
0e90167513
Remove lodash clone
...
(re: #6087 )
2019-03-22 23:18:25 -04:00
Quincy Morgan
78590466ba
Merge branch 'master' into add-feature-search-bar
2019-03-06 15:50:31 -05:00
Bryan Housel
e216d5be3e
Avoid dispatching extra change events, don't mutate childNodes
...
(closes #5996 , related #5941 )
2019-03-06 15:41:12 -05:00
Quincy Morgan
5ed5a7536b
Show preset browser when adding generic point, line, or area
2019-03-01 09:07:41 -05:00
Quincy Morgan
a3424aa4b1
Merge branch 'master' into squash-favorite-preset
2019-02-26 14:25:34 -05:00
Quincy Morgan
5262358d81
Fix an issue where added nodes would highlight momentarily while drawing an area
2019-02-26 09:34:45 -05:00
Quincy Morgan
ced652806b
Fix an issue where some tagged nodes or existing vertices could not be snapped to ( close #5942 )
2019-02-25 08:54:30 -05:00
J Guthrie
249046614c
Add exception to isInvalidGeometry algorithm
...
- An area with just 1 placed node (2 nodes including active, to-be-placed node,
returns as valid and is picked up by later way.isDegenerate() check
2019-02-24 13:58:16 +00:00
Quincy Morgan
7da37384f1
Fix an issue where stale missing tag errors could persist when canceling drawing a new way ( close #5918 )
...
Don't show missing tags error for a feature that is still being drawn (re: #5898 )
2019-02-21 09:48:46 -05:00
Quincy Morgan
be71554f61
Fix a bug where all data would disappear when switching modes while drawing a way ( close #5917 )
2019-02-21 09:22:03 -05:00
Brian Hatchl
1faa6ad839
Favorite preset
2019-02-20 15:23:58 -05:00
Quincy Morgan
708c5e8155
Fix crash when undoing an added line past the first node
2019-02-19 12:10:05 -05:00
Quincy Morgan
31eb837596
Fix issue where fixes would not expand when clicking an issue
...
Rename issue label class to messages
Remove fix list animation
2019-02-15 13:40:45 -05:00
Quincy Morgan
058a8ee8ff
Merge branch 'master' into validation
2019-02-15 12:03:57 -05:00
Quincy Morgan
0b86be7bcb
Fix bug where highlight would not appear on the first target node when continuing drawing a way
2019-02-15 11:56:31 -05:00
Bryan Housel
078b19c828
Better handle undo/interruption during behaviorDrawWay
2019-02-14 17:24:09 -05:00
Quincy Morgan
db319e8ff5
Merge branch 'master' into validation
2019-02-11 07:59:29 -05:00
Quincy Morgan
a80aaf65db
Improve performance when checking way for self-intersection when drawing
2019-02-05 11:42:45 -05:00
Max Grossman
58e31bc45a
initial update to draw modes and hover behavior
...
ref #5811
2019-02-01 17:34:40 -05:00
Quincy Morgan
1066f8f788
Fix issue where preset browser would show after continuing a line ( close #5770 )
2019-01-28 08:52:20 -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
eba115803a
Variable cleanups in behavior and modes
2018-09-06 09:50:26 -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
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
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
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
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
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
75d2c45fd6
Convert lodah-es and d3 to named imports for behaviors
2017-09-24 21:43:54 -04: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
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
e756520bd8
suppressMenu(true) is now the default
2017-02-21 15:47:22 -05:00
Bryan Housel
fd9b3931d8
Use temp names for temp segments
...
(closes #1369 )
2017-01-13 18:44:42 +05:30
Bryan Housel
45b7a40557
Fix area drawing for #3676
...
These changes are needed now that `addNode`
* wants to preserve circularity
* automatically remove duplicates
* range checks index argument (can't call it with -1 anymore)
2017-01-12 19:30:07 +05:30
Bryan Housel
07fa5fcc34
Refactor Entity, Node, Relation, Tags, Way from core to osm
2016-10-11 22:41:24 -04:00
Bryan Housel
3102a4ae6a
Rename all the things to include pseudonamespaces
2016-10-04 19:06:20 -04:00
Tom MacWright
947a1d9c1a
Resolve lints
2016-09-03 19:08:03 -04:00
Tom MacWright
3af54610ca
Refactor customEvent system to use d3.customEvent
2016-09-03 17:56:56 -04:00