Commit Graph

30 Commits

Author SHA1 Message Date
Bryan Housel
cc79e2170b Only draw targets for lines and areas that have a valid path
Before, it was drawing svg path elements for all the segments,
even those that were clipped out of view (getPath returns null).
This was putting a lot of junk into the DOM.
2018-03-01 22:49:56 -05:00
Bryan Housel
de488e252f Draw covered/underground lines beneath areas
(closes #4718)
2018-01-22 15:06:58 -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
7851c49e80 Fix nopefilters by testing the original id for the filter 2017-12-22 00:26:39 -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
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
Bryan Housel
aa68b21d7a Add touch targets for line/area 2017-12-17 22:53:58 -05:00
Bryan Housel
9edae82673 Convert lodah-es and d3 to named imports for svg 2017-09-25 23:16:24 -04:00
Bryan Housel
26ae84f8e5 Render old-style multipolygons slightly differently
(for #3908)
2017-04-20 23:34:00 -04:00
Bryan Housel
0228f934b3 Put back the selected class when redrawing selected lines 2017-03-21 14:19:57 -04:00
Bryan Housel
85ed3cc2d3 Cleanup line drawing code with selected sort 2017-03-21 12:42:46 -04:00
Bryan Housel
4903d495b7 Draw selected items last, so halos are more visible
(see #2914)
2017-03-21 02:17:04 -04:00
Bryan Housel
efd9e6df4b Memoize and avoid extra calls to utilDetect() 2016-10-18 21:48:39 -04:00
Bryan Housel
f50e80d0b5 Refactor Intersection, Multipolygon from geo to osm 2016-10-11 23:09:27 -04:00
Bryan Housel
07fa5fcc34 Refactor Entity, Node, Relation, Tags, Way from core to osm 2016-10-11 22:41:24 -04:00
Bryan Housel
0d0e54fdff Fix more namespaces that were missed in the first pass 2016-10-04 21:15:30 -04:00
Bryan Housel
3102a4ae6a Rename all the things to include pseudonamespaces 2016-10-04 19:06:20 -04:00
Bryan Housel
545cd4a44d Fix oneways 2016-09-23 12:00:21 -04:00
Bryan Housel
a6d683eaf7 Code cleanups in svg, ui for selection merging, fix Mapillary. 2016-09-17 23:26:49 -04:00
Bryan Housel
afb88f2ae6 Fix rendering selections for all the OSM layers
This includes some renames for clarity.. "surface" -> "selection"
to make it clearer that rendering functions take a selection, and
don't necessarily render to the literal `#surface` node anymore.
2016-09-08 22:37:06 -04:00
Tom MacWright
a28e24bb4c Fix lints 2016-09-06 17:29:03 -04:00
Tom MacWright
20962074ba Fix vertices areas midlines 2016-09-06 10:58:07 -04:00
Tom MacWright
c5b3a16d3a Fix getSetValue, fix line display 2016-09-03 16:39:30 -04:00
Tom MacWright
cdb533fa84 Begin d3 v4 update 2016-08-21 15:19:27 -04:00
Tom MacWright
604d1e2719 import lodash (#3257) 2016-07-19 12:04:16 -04:00
Bryan Housel
cb71e90384 Module for iD.Detect() (#3243)
* convert iD.Detect() iife to a module

* iD.Detect() should return loaded locale (except for 'en')

(The previous code was a hack to replace the detected locale with the loaded
locale.  Now that Detect is a module, we can not replace the detected locale
from external code, but we can have Detect() return the locale we really want)
2016-07-13 09:15:47 -04:00
Kushan Joshi
b3492b17a0 external modules for SVG 2016-07-06 14:39:14 -04:00
Beau Gunderson
fb838645ae refactor svg into ES6 modules for #3118 2016-06-16 11:58:23 -07:00