Commit Graph

102 Commits

Author SHA1 Message Date
Quincy Morgan
c2a49f4e02 Disallow zooming past the min/max zoom bounds via scrolling or pinch-to-zoom (close #6851) 2019-09-19 16:27:51 -04:00
Quincy Morgan
a97f05c9dc Disable zoom in/out buttons when at max or min zoom already (close #6847) 2019-09-18 15:56:32 -04:00
Quincy Morgan
dd7b2603af Fix issue where a deleted feature might not disappear from the map (close #6480) 2019-08-13 15:25:07 -05:00
Quincy Morgan
c95cead06d Fix bug where issues would not be properly centered if the map was not already at z19 (close #6384) 2019-05-24 10:28:59 -04:00
Quincy Morgan
7a6949aa2e Account for the width of open panes when centering the map on issues 2019-05-10 11:33:59 -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
7dce4bb161 Avoid asking DOM if layers are classed disabled in map.editable
`map.editable` is hot code because it's called frequently by the `isHiddenX`
tests in `features.js`.  It's much more efficient to just ask the osm layer
whether it is enabled, than to use D3 to find that layer in the DOM and check
whether it's classed `disabled`
2019-04-22 22:12:42 -04:00
Bryan Housel
51c1088c1b Merge branch 'master' into validation_and_change_perf 2019-04-19 15:18:23 -04:00
Quincy Morgan
84b7e08bf8 Don't select the previously-edited node when undoing/redoing (re: #5831) 2019-04-16 14:21:15 -07:00
Bryan Housel
0dd262d1dd Don't dispatch 'change' on history.merged, dispatch 'merge' only
Change performs an expensive immediate redraw, and merge can schedule
a redraw for later.
2019-04-12 09:56:18 -04:00
Bryan Housel
87e3b928d0 Reduce drawing during history changes
(closes #6086)
2019-04-03 23:26:26 -04:00
Bryan Housel
d5abe468b9 Remove rest of the lodash iterators: map, reduce, forEach
(re: #6087)
2019-03-29 15:14:21 -04:00
Quincy Morgan
6fb8fcb86b Make map pan to the location of the undone edit when undoing instead of the location of the edit before that (close #5831) 2019-03-27 18:02:21 -04:00
Bryan Housel
11bfeaabfc Add browser-polyfills, remove lodash assign, compact, values
(re: #6087)
2019-03-22 17:14:41 -04:00
Bryan Housel
ebddfc896a Don't render background() when adding map to initial #map div
This was triggering an unnecessary render at zoom 2
right before the map was properly centerzoomed
2019-03-06 21:51:02 -05:00
Bryan Housel
a9ac1bda97 Fix issues causing mode/undo/save buttons to be missing disabled style 2019-01-17 00:06:57 -05:00
Bryan Housel
3fe6c0dbe7 Support more eased transitions, cleanup code
(re: #3967, #5169, #5407)
2019-01-16 13:42:32 -05:00
Bryan Housel
91bfac5861 Add map.centerZoomEase and simplify internal center/zoom code
(closes #3967)
2019-01-16 01:31:26 -05:00
Bryan Housel
68be75af09 Assumption about mozInputSource = 1 was incorrect
Removing this conditional allows 2 finger panning on Firefox
2019-01-15 14:46:23 -05:00
Bryan Housel
9c190e83e9 Add quickLinks to preset editor, zoom to selected feature 2019-01-09 21:56:08 -05:00
Bryan Housel
cd9203975d Use touch targets for notes, fix a few bugs with note dragging
(closes #5213)
2019-01-04 15:48:39 -05:00
Bryan Housel
2deadd5d6c Fix merge issues 2018-12-19 17:12:06 -05:00
Thomas Hervey
31f35b0389 added basics to sidebar 2018-12-19 13:35:26 -05:00
Bryan Housel
d28b269b4c Speed up the scrolling on Firefox Linux too
(re: #5512)

This just changes
`detected.os === 'win'`  to  `detected.os !== 'mac'`
2018-12-12 15:45:55 -05:00
Bryan Housel
4f8f45ec52 Fix issues with slow scrolling and improper panning on windows
(closes #5512)
2018-11-30 22:57:30 -05:00
Quincy Morgan
d6ea64241b Trackpad scroll-to-zoom while holding Shift or Option/Alt 2018-11-21 20:55:30 -05:00
Bryan Housel
9627e1e261 Test in all browsers, improve calcs, cleanup code 2018-11-20 11:48:27 -05:00
Bryan Housel
45a3e58c37 Add support for 2-finger pan and zoom gestures
Also adjust the zooming delta function on Firefox
(which uses wheel events in line units instead of pixel units)
2018-11-19 22:40:23 -05:00
Bryan Housel
b7e218a6cb Remap Safari gesture events to wheel events - #5492
(still needs some more testing)
2018-11-17 02:31:15 -05:00
Bryan Housel
3bc841e95b Adjust layer ordering to draw touch targets above data layers 2018-11-09 21:48:45 -05:00
Bryan Housel
c2971f667d Remove setCenter() from map.dimensions()
This was triggering a weird redraw which made the map slow and look wrong
The map will redraw again in a few milleseconds anyway.

This means that the the map will not stay on the center, but rather the
top-left corner, which kind of feels better anyway, as it doesn't move things
around as much.
2018-11-02 10:52:16 -04:00
Bryan Housel
cc938698e8 Add ability to select custom data 2018-08-25 11:14:04 -04:00
Bryan Housel
f74d21557c Force redraws after moving a note or cancelling a note
similar to 95ea0dbbc, there is no history change event to force a redraw
2018-07-24 19:34:01 -04:00
Bryan Housel
63614d5909 formatting 2018-07-24 15:14:26 -04:00
Bryan Housel
46dc44b35b Make the mode buttons dynamic
- show/hide the note button when the notes layer is enabled/disabled
- enable/disable the note button based on notesEditable
2018-07-23 22:21:47 -04:00
Bryan Housel
78fc2f7c27 No longer need to pass dimension to loadTiles 2018-07-23 21:07:28 -04:00
Thomas Hervey
e23ef4ba4a redraw on note drag. TODO: change dispatch call 2018-07-23 15:09:25 -04:00
Thomas Hervey
bf9b19359a WIP drag note 2018-07-20 21:41:44 -04:00
Thomas Hervey
73ee5c2fc9 fixed select_note mode, cleaned note_editor, TODO: enable note save 2018-07-03 22:45:51 -04:00
Bryan Housel
7716532061 Class surface as lowzoom around z17-z18.5 (based on latitude)
(closes #5101)
2018-06-23 01:42:11 -04:00
Bryan Housel
b238d442a6 Adjust default zoom for points to z19
(closes #5099)
2018-06-21 01:33:18 -04:00
Bryan Housel
aa9cc84ae7 pacify eslint 2018-06-13 18:14:32 -04:00
Bryan Housel
3c02c2ee7b Don't update the streetside viewfield when the map is moving 2018-06-13 15:34:39 -04:00
Bryan Housel
5a97f54317 Fix zoom scaleExtent to allow zoom out to z2 (full map)
(closes #4959)

Also includes some code formatting and cleanup
2018-04-02 15:26:52 -04:00
Bryan Housel
835d45ed6d Never let mouseCoordinates return NaN (fallback to map center) 2018-01-19 11:53:14 -05:00
Bryan Housel
1cfda3ec86 Only store zoomPan event in mousemove if it has a source event
(closes #4706)

d3 transitioned events don't have a source event,
causing mousemove to go null
2018-01-19 11:42:18 -05:00
Bryan Housel
8472f99347 Zooming out should not exit save mode
(closes #4664)
2018-01-08 09:49:32 -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