Bryan Housel
33fab5580b
Before calling init() make sure the assetPath is set
...
init kicks off building the ui, which can fetch spritesheets for the <defs>
The assetPath needs to be set otherwise these files will not be found
2021-08-16 22:06:42 -04:00
Quincy Morgan
c893147e15
Convert some element ids to classes to avoid collisions when embedding iD
2020-03-20 13:53:17 -07:00
Bryan Housel
e19bcb77d5
Require init() call before coreContext starts doing things
...
(closes #7304 )
2020-01-29 19:27:12 -05:00
Bryan Housel
2e2b037e36
Move a bunch of commonly used vector and projection math functions into geo
...
- geoVecAdd
- geoVecSubtract
- geoVecScale
- geoZoomToScale
- geoScaleToZoom
2017-12-18 15:05:42 -05:00
Bryan Housel
89d8d37576
Drawing all the correct vertices now where I want them, simplify classes
...
Some highlights
- `getSiblingAndChildVertices` are expensive, so they're saved and called less frequently
- draw touch targets for all the visible vertices
- remove redundant css classes and `setClass` function
2017-12-15 17:28:20 -05:00
Bryan Housel
b9e48d1682
WIP: Move layer-hit to layer-points with explict sublayers, update tests
...
This is more work to further isolate the layers that entities draw to.
It makes it easier to debug what is going on, and can eventually lead to
deferred drawing, if each draw function is in its own place and not dependant
on anything else.
I've started to replace the vertex-hover with an explicit layer for touch
targets.
Also had to change a lot of the svg tests, which are really brittle.
Things would happen like - the surface would be created, it would kick of a
deferred redraw, which would notice that the zoom was 0 and call
editOff, which would remove the osm layers that were just created and
that the tests were trying to draw to. These tests need proper zoom and
projection otherwise nothing works.
2017-12-14 17:38:43 -05:00
Bryan Housel
c7044bec3a
Better mock for select mode, fixes false test failures
2017-08-09 11:09:08 -04:00
Bryan Housel
f800e5afbc
Remove unnecessary window parameter to Context
2016-11-10 15:19:03 -05:00
Bryan Housel
87950fd472
Fix lib export, flatten names in tests and docs
2016-10-04 21:56:09 -04:00
Bryan Housel
273407da3d
Fix svg layer selections, fix and add tests..
2016-09-09 14:19:13 -04:00
Tom MacWright
20962074ba
Fix vertices areas midlines
2016-09-06 10:58:07 -04:00
Bryan Housel
a86f34b4ef
Pacify eslint, get build and tests running again
2016-08-26 01:15:07 -04:00
Bryan Housel
7ca6d06254
Replace iD global with iD.Context() module ( #3254 )
2016-07-19 10:15:32 -04:00
Kushan Joshi
1db442b9e8
Remove linting errors fromspec/svg
2016-06-15 18:26:11 +05:30
Bryan Housel
e22bd1eceb
Pass projection to iD.svg.Layers in tests
2016-06-10 13:06:28 -04:00
Bryan Housel
45e4e730a8
iD.svg.Surface -> iD.svg.Layers
2016-02-24 15:41:22 -05:00
Bryan Housel
26f8849c3a
render triangular midpoints to show direction of way #1085
2014-07-16 00:30:21 -04:00
Bryan Housel
1a2b9c82f6
add tests, jshint cleanup
2014-06-16 11:49:07 -04:00
John Firebaugh
a84a3364cc
selection -> selectedIDs
...
Overloading "selection" is a bad idea.
2013-06-03 15:48:03 -07:00
John Firebaugh
78aee5b6aa
Fix tests
2013-04-23 20:09:36 -07:00
John Firebaugh
77ce20c8c1
Add configurable image path
2013-04-16 17:20:21 -07:00
John Firebaugh
944f44defd
Really fix spec
2013-03-13 17:45:16 -07:00
John Firebaugh
71897a53cd
Fix spec
2013-03-13 17:42:16 -07:00
John Firebaugh
56a3edcf7f
Fix tests
...
Disabling translation test, it's just too painful
2013-02-27 20:47:49 -08:00
Ansis Brammanis
dfeff7e00d
Fix svg midpoint tests
2013-02-18 18:38:01 -05:00
Ansis Brammanis
d3d0851596
Fix svg/midpoint tests
...
Proper solution waiting on 369
2013-02-05 00:51:54 -05:00
John Firebaugh
459dc00ce5
Change the midpoint data a bit
...
Store the ways which share the segment and the index of
the segment. This will be used in both DragWay and Draw
behaviors.
2013-01-30 15:47:33 -05:00