Commit Graph

117 Commits

Author SHA1 Message Date
Bryan Housel
8472f99347 Zooming out should not exit save mode
(closes #4664)
2018-01-08 09:49:32 -05:00
Bryan Housel
dba4626cfa Merge pull request #4575 from openstreetmap/background_pane
Enhancements to Background, Map Data, Help panes
2018-01-03 15:32:18 -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
be00a526b6 Make sure all targets are redrawn during a mode change
There was an issue where the lines did not redraw their targets right away
when entering drag node, which could make it possible for a quick drag node
to try to connect to its parent line.  With the chooseEdge exclusion it
would not connect to the parent nearby, but in another weird part of the line.
2017-12-22 11:42:21 -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
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
899abc7ef5 WIP to render vertices while dragging
(re: #3003 / #4602)

For now, drawHover is commented out.  Still not sure what I will do with it.
This means that things flicker a bit when dragging, also connecting nodes
(and closing lines) does not currently work.

There was lot going on preventing the vertices from rendering while dragging.

1. `modeDragNode` needed a proper `selectedIDs()` function that works like other
modes.. Many other places in iD (including the vertex renderer) call `context.selectedIDs()`..
This means that `modeDragNode` needs a new function `restoreSelectedIDs()` to do what
`selectedIDs()` was previously doing (a place to store selectedIDs so that we
can reselect those entities after the user is done dragging a node in select mode)

2. Just so many things in svg/vertices.js
  - siblingAndChildVertices was missing some things for points that we render
    as vertices (points in wireframe, points with directions)
  - the sibling vertices weren't being included in the `filter` function, so
    would disappear when doing differenced/extent redraws
  - probably some other things
2017-12-12 17:39:36 -05:00
Bryan Housel
a5bbc21728 Remove unnecessary zoom parameter 2017-12-11 17:34:01 -05:00
Bryan Housel
18ab596f58 Improve int'l date/time strings on imagery and history tools
(closes #4594)
2017-12-06 15:27:54 -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
Bryan Housel
50c1b58bda Added saturation slider, simplify code, improved sharpen parameters 2017-11-30 23:24:55 -05:00
Bryan Housel
53225f08ec more tweaks to unsharp mask 2017-11-30 16:19:06 -05:00
Bryan Housel
2946774e60 WIP: Add unsharp-mask filter layer to sharpen background imagery 2017-11-30 01:56:23 -05:00
Bryan Housel
0c0ecdfcfc Comment out some of the requestIdleCallback to fix walkthrough crash
(closes #4533)

There are several issues here.. Here's a quick brain dump:

- the requestIdleCallbacks in map.js (scheduleRedraw) seem to be causing
crashiness in Firefox on fast zoom/unzoom, mousewheel, etc.. anything where
the view transform changes a lot and the redraws don't catch up.
(commented out, reverted back to lodash throttle)

- the requestIdleCallback worker queue in idle_worker.js seems to be causing
crashiness in Firefox and Chrome when exiting the walkthrough.  Something about
deferring the tile parsing as the user leaves the intro has a problem.
It might be an infinite `while` loop, not sure.
(commented out, reverted back to for loop)

- the requestIdleCallback in call_when_idle.js is only used to defer
tile loading in context.loadTiles() - this one seems fine, and actually
has maybe the biggest benefit for improving performance.
(left in)
2017-11-15 22:21:40 -05:00
Bryan Housel
6e0a2c1221 Don't use real filenames in the imagery_used field (for privacy)
(closes #4530)
2017-11-15 11:56:32 -05:00
Bryan Housel
9b705a6375 Don't call async callbacks after connection resets/switches
(closes #4288)
2017-11-14 21:30:01 -05:00
Bryan Housel
00b30e29f0 WIP: Add OpenStreetCam support
todo: Need to figure out API issue with bbox, then imageviewer
2017-11-02 22:04:47 -04:00
Bryan Housel
a0a197a69e Add support for DigitalGlobe imagery vintage overlays
(see https://github.com/osmlab/editor-layer-index/issues/371)
2017-11-01 13:46:13 -04:00
Bryan Housel
475db33b3f Bump default max_zoom from 20 to 22 (affects custom imagery) 2017-11-01 10:36:23 -04:00
Bryan Housel
30ff68348f Don't disable boundries when disable_features list is present
(also removed some unused functions)
2017-10-23 15:53:46 -04:00
Bryan Housel
dbf85dae43 If no features are disabled remove the querystring parameter 2017-10-22 22:42:35 -06:00
Bryan Housel
469df0b059 Change features to disable_features querystring, add init() 2017-10-22 12:00:51 -06:00
Bryan Housel
3332847beb Merge pull request #4439 from ferdibiflator/features-api-parameter
add the features api parameter which enables the list of features
2017-10-22 10:40:44 -06:00
Nikita Mashukov
a00debe663 push gpx src (file name or url) to imagery_used 2017-10-14 18:37:49 +07:00
Nikita Mashukov
bac4da5abe using spaces instead tabs 2017-10-14 17:46:29 +07:00
Nikita Mashukov
f92e248e5a init features logic fix 🐛 2017-10-14 17:41:15 +07:00
Nikita Mashukov
5a980ec24f tabs are replaced by spaces 2017-10-14 17:06:51 +07:00
Nikita Mashukov
7cd3882cf8 missed semicolon is added 2017-10-14 17:03:21 +07:00
Nikita Mashukov
b7b5171a2f add features api parameter which enables the list of features 2017-10-14 12:08:12 +07:00
Bryan Housel
d906ca6b10 Convert lodah-es and d3 to named imports for renderer 2017-09-25 14:35:33 -04:00
Bryan Housel
5a8709bc67 Treat osm layer like other vector layers and give it a toggle
(closes #2904)
2017-09-18 22:03:34 -04:00
Bryan Housel
12be1a8161 pacify eslint 2017-09-13 09:03:16 -04:00
Bryan Housel
1fcceeb0e8 Move string processing into background_source 2017-09-12 17:02:17 -04:00
Bryan Housel
9d60d9c6b0 Track inflight jsonp requests and avoid reissuing them 2017-09-12 15:00:32 -04:00
Bryan Housel
6addbba340 reorganize metadata object, change display of meters 2017-09-12 14:51:01 -04:00
john gravois
5f341366e7 display additional metadata from Esri World Imagery
* getVintage() becomes getMetadata()
* ignore a couple unrelated lint nags
* add source description, resolution and accuracy info to debug panel
2017-09-11 09:51:07 -07:00
jgravois
7521369ece add support for displaying esri metadata 2017-09-09 21:59:07 -07:00
Bryan Housel
1c9719d763 Avoid requesting blank tiles from EsriWorldImagery
(closes #4327)

This allows the real tiles to overzoom, so the user does not see
tiles with the "map data not yet available" message
2017-09-09 08:51:13 -04:00
Bryan Housel
bcfcfdea35 Merge branch 'master' into performance 2017-08-24 12:06:36 -04:00
Kushan Joshi
909b72a39e cleaning up 2017-08-24 17:03:04 +05:30
Kushan Joshi
91a569985d playing with map render 2017-08-24 17:02:49 +05:30
Bryan Housel
8ed2d18474 Apply imagary offset to projection before tiling background layer
(closes #4232)
2017-08-18 22:53:11 -04:00
Bryan Housel
99a3741b0c Better isolation of services, to avoid hitting network during test runs
1. All services are disabled in testing now to prevent network accesses
2. Only services are enabled when needed to test something
3. Many changes throughout code to allow iD to run with services disabled
   (e.g. check for osm service instead of assuming context.connection() will work)
4. Actually export the services so we can disable and enable them
2017-08-09 22:04:09 -04:00
Bryan Housel
881f979d46 Return to browse mode when zooming out beyond edit limit
(closes #4184)
2017-08-08 18:14:23 -04:00
Bryan Housel
f52a356b46 Keep previous mousemove event updated while zoompanning
(closes #4155)
2017-07-22 01:00:56 -04:00
Bryan Housel
3464a46df6 All imagery layers should just be owned by rendererBackground()
This moves management of the custom layer out of uiBackground()
2017-07-20 16:07:10 -04:00
Pierre GIRAUD
5b89003101 Remember the chosen custom background when set by url 2017-07-20 09:35:30 +02:00