Martin Raifer
ac77289b4d
refactor localized text rendering in tooltips, flash messages
2022-06-23 18:55:57 +02:00
Martin Raifer
040257fd44
replace unnecessary setting of raw "html" with "text"
2021-11-18 18:53:33 +01:00
Quincy Morgan
4059ee5118
Enable block-scoped-var eslint rule
2020-10-23 13:38:36 -04:00
Quincy Morgan
21a49bbec8
Initial support for D3 v6.2.0
2020-10-06 15:08:39 -04:00
Quincy Morgan
8883c2f36d
Fix uiFlash issues
...
Clean up a few things from prior commit
2020-09-22 12:19:54 -04:00
Peter Newman
4205ca1d07
Fix the seemingly safe spellings found by codespell
...
Untested, only checked by inspection.
(cherry picked from commit 2c47a11008 )
2020-08-10 17:32:37 +01:00
Quincy Morgan
38db23fab5
Extend behaviorHover to support multiple pointers
2020-05-27 15:07:23 -04:00
Quincy Morgan
60f7dc7c0b
Replace presets property of context with singleton
...
Remove utilPreset
2020-04-01 13:08:45 -07:00
Quincy Morgan
a1af118f0e
Ensure locales and presets are loaded before the UI loads ( close #7406 )
...
Consolidate localization behavior and init to a coreLocalizer function and singleton
Explicitly support `en-US` locale
Rename coreData to coreFileFetcher and export a singleton rather than using a property of coreContext
Add `apiConnections` property of coreContext to simplify adding a source switcher
Replace some init functions with re-callable, promise-supporting `ensureLoaded` functions
Make coreContext itself load the UI if a container has been specified at init time
Fix code tests
2020-03-31 12:23:31 -07:00
Quincy Morgan
a1a398650f
Instantiate uiFlash only once as a property of the UI and remove global selection (re: #7445 )
2020-03-29 10:22:58 -07:00
Quincy Morgan
eed7944a1a
Replace various uses of d3_select and d3_selectAll with selection on the container
2020-03-22 12:34:06 -07:00
Quincy Morgan
6087aae21f
Remove map convenience functions of context
2020-03-22 10:57:17 -07:00
Quincy Morgan
fac613e1dc
Remove context.childNodes function
2020-03-21 13:56:11 -07:00
Quincy Morgan
c893147e15
Convert some element ids to classes to avoid collisions when embedding iD
2020-03-20 13:53:17 -07:00
Quincy Morgan
ece7eb0850
Add self-intersection error message when dragging vertices
2020-03-09 14:52:17 -07:00
Quincy Morgan
83a51a4192
Use pointer events for node dragging and drawing (re: #5505 )
...
Enable dragging nodes with touches and styluses (close #7415 )
2020-03-05 15:18:39 -08:00
Quincy Morgan
912151ff38
Allow viewing and editing the tags/relations of selected features at any zoom level in 2.x (re: #5001 )
2019-12-12 16:54:16 -05:00
Quincy Morgan
c97ea095f5
Select standalone points after dragging them ( close #5747 )
2019-08-21 13:46:04 -05:00
Quincy Morgan
760134c2aa
Add check for possible missing activeEntity in drag_node
2019-05-08 12:17:36 -04:00
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
5e1ff74199
Replace lodash difference, intersects, union
...
(re: 6087)
2019-03-27 01:22:11 -04:00
Bryan Housel
ff4f8f005f
Remove lodash find and findIndex
...
(re: #6087 )
2019-03-22 17:31:41 -04: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
Quincy Morgan
058a8ee8ff
Merge branch 'master' into validation
2019-02-15 12:03:57 -05:00
Quincy Morgan
96a1ec92c7
Fix prior commit
...
Apply same node snap suppression behavior to dragging vertices as to drawing ways
2019-02-15 10:28:43 -05:00
Quincy Morgan
db319e8ff5
Merge branch 'master' into validation
2019-02-11 07:59:29 -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
536ee2e786
Validations now update instantly upon an annotated graph change
2019-01-14 15:19:00 -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
3bc841e95b
Adjust layer ordering to draw touch targets above data layers
2018-11-09 21:48:45 -05:00
Quincy Morgan
50d0b98be8
Adds undo messages for connecting points to points, vertices, lines, and areas; and vertices to sibling and adjacent vertices
...
Closes #1252
2018-11-05 17:50:15 -08:00
Bryan Housel
69ebb97815
Simplify drag_note mode
2018-07-24 17:17:24 -04:00
Bryan Housel
7a0d0352d2
Use connection.disabled to prevent dragging from breaking a relation
...
(closes #4921 )
2018-04-14 23:12:53 -04:00
Bryan Housel
8fb083578f
Prevent drag/connect which could damage relations
...
(closes #4921 )
2018-04-12 17:32:16 -04:00
Bryan Housel
d5bf2d9762
Add geoHasLineIntersections, better for testing multipolygon rings
...
(closes #4741 )
2018-01-24 23:16:51 -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
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
9c27893748
Check for valid multipolygon geometry when dragging nodes
...
(this can get a bit expensive for large/complex multipolygons)
2017-12-31 02:26:19 -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
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
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
d6e8ca2a1c
Transitioned bouncebacks when user drags node onto a nope
2017-12-22 21:06:44 -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
7a8f50c74e
More fixes for drawing/snapping, don't draw touch targets for activeIDs
2017-12-18 22:54:49 -05:00