Commit Graph

224 Commits

Author SHA1 Message Date
Quincy Morgan
4872b06a28 Randomize form field ids to thwart browser memory and help with embedding iD (close #6444) 2020-03-21 13:16:40 -07:00
Quincy Morgan
7adaa2f753 Merge branch '2.x' into issue#7297 2020-03-13 14:13:44 -07:00
Quincy Morgan
de1bfe624f Replace mouse and touch events with pointer events in popover.js (re: #5505) 2020-03-13 12:34:06 -07:00
Quincy Morgan
70380880db Properly end the gesture if unexpectedly moving a non-down pointer 2020-03-10 12:17:25 -07:00
Quincy Morgan
284ff28961 Fix issue where map could pan when moving the mouse without a down pointer 2020-03-10 11:52:48 -07:00
Quincy Morgan
8dcb50579f Replace D3 import of trivial function 2020-03-10 10:48:27 -07:00
Quincy Morgan
5d8600ff36 Remove unused zoom/pan functionality 2020-03-10 10:34:25 -07:00
Quincy Morgan
d6b723b869 Remove unused zoom/pan handler property 2020-03-09 13:12:55 -07:00
Quincy Morgan
f8f69a777a Replace inconsistently-supported dblclick events with custom handler on platforms supporting pointer events
Fix issue where double-tap-to-zoom would not be properly disabled when drawing on touch devices (close #2128)
Support adding nodes to ways with double-tap with on touch devices (close #2677)
Support double-tap-to-zoom with styluses on touch devices
Don't accept double click/tap events if the taps are far apart
Don't re-enter modeSelect when clicking the selected feature again
2020-03-06 12:46:26 -08:00
Quincy Morgan
1147438d12 Use pointer events for map zooming and panning where supported (close #6598, re: #5505) 2020-03-05 10:38:30 -08:00
Quincy Morgan
c8e9bf3de7 Account for empty string tag values in utilTagDiff (re: #7363) 2020-02-27 15:18:31 -08:00
Bryan Housel
b12c30461b Don't bundle the locales anymore, load first in context init
(re: #4994)
2020-02-21 12:24:08 -05:00
Bryan Housel
e8f4452d49 Don't bundle the en.json strings anymore, Promisify locale loading
(re: #4994)
2020-02-21 11:09:59 -05:00
Bryan Housel
ed58c8f62b ES6ify detect.js 2020-02-21 10:42:58 -05:00
Bryan Housel
dc7fba4bf8 Have utilStringQs advance past any leading '?' or '#' characters
This lets us remove a bunch of substring(1) and +1 from the code.
2020-02-20 17:09:54 -05:00
Bryan Housel
503d287995 ES6ify locale.js 2020-02-20 10:26:09 -05:00
root
12141bc655 Add extra value checking to enable adding tags with value '' from text area. 2020-02-16 20:56:58 -04:00
Bryan Housel
030a85199f Add support for AES encrypt/decrypting sensitive values
(closes #7355)
2020-02-13 13:12:24 -05:00
SilentSpike
af5b64a477 Allow translation with numerical token replacement
Just escapes the special regex characters when creating a new RegExp so
that numerical keys can be used (e.g. my use case of replacing an
arbitrary number of tokens from an array). Otherwise it is interpreted
as a repetition.
2020-02-03 23:01:01 +00:00
Quincy Morgan
1b331bb678 Add mechanism for fields to support editing during multiselection (re: #7276)
Add `utilCombinedTags` method and use it for the raw tag editor as well as fields
Pass `entityIDs` array into fields instead of single `entity` object
Give field revertion its own path separate from `change`
Add multiselection editing to fields in files: access, address, check, combo, cycleway, input, maxspeed, textarea, and wikidata
2020-01-30 13:53:29 -05:00
Bryan Housel
567eeac587 Make several data external instead of bundled:
Also dist/data/* contains minified files now

These are now external and will fetch as needed:
-export { dataAddressFormats } from './address-formats.json';
-export { dataDeprecated } from './deprecated.json';
-export { dataDiscarded } from './discarded.json';
-export { dataLanguages } from './languages.json';
-export { dataPhoneFormats } from './phone-formats.json';
-export { dataShortcuts } from './shortcuts.json';
-export { dataTerritoryLanguages } from './territory-languages.json';
2020-01-28 22:21:31 -05:00
Quincy Morgan
c5b2ad1aca Add fast path for array comparison if objects are equal 2020-01-18 14:39:15 -05:00
Quincy Morgan
721ee0e95f Prevent unnecessary reloading of raw tag editor (close #7248) 2020-01-18 12:30:35 -05:00
Quincy Morgan
1546b31121 Fix eslint error (re: #7182) 2019-12-26 17:26:07 -05:00
Nick Doiron
345ee6b5c2 numerals fix 2019-12-26 13:16:36 -05:00
Nick Doiron
e2001b02f4 Arabic + Latin Bidi labels 2019-12-26 12:53:29 -05:00
Quincy Morgan
ae7eadb89c Properly update undo/redo button tooltips when undoing/redoing (close #6872) 2019-12-23 11:06:23 -05:00
Quincy Morgan
11dfe7e571 Add util function for generating classes/ids from any string 2019-12-20 12:37:53 -05:00
Quincy Morgan
201d451615 Add hacky fix for left-positioned popovers not appearing correctly on first appearance 2019-12-16 17:12:12 -05:00
Quincy Morgan
2c96fb293d Improve popover variable names 2019-12-16 15:49:34 -05:00
Quincy Morgan
523a467836 2.x: Make toolbar horizontally scrollable when it overflows (re: #6755, re: 7545f67063b5e7007ef2d8367e3181e59c04a487)
Generalize tooltip into popover control
Use the same popover control for tooltip as the preset browser and tools list popovers
Smartly position the preset browser popover and menu bar tooltips to stay fully onscreen
Position most tooltips closer to their controls
Fix small gap that could appear between a tooltip and its arrow
Allow wider toolbar tooltips
2019-12-16 13:30:07 -05:00
Quincy Morgan
7ca9f55d43 2.x: Don't render multipolygon members in yellow when the multipolygon is selected (re: #6558, re: 4ab97128c4aae04b627cf8f19091c6c0fc1cf5bc) 2019-12-13 14:19:15 -05:00
Quincy Morgan
7473d32e31 2.x: Highlight relation members in yellow when a relation is selected, including in a multi-selection (re: #5766, re: cf2935576511a1b9f5aac47407ed2b0ce803902a) 2019-12-13 11:20:40 -05: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
8cc9ca6aa6 Add script translations to labels 2019-08-02 11:17:39 -04:00
Quincy Morgan
08b4897335 Change syntax that the tests can't handle 2019-07-31 14:08:54 -04:00
Quincy Morgan
e37948fe9a Use CLDR for a translated language list in the localized name field instead of untranslated wmf site matrix (close #2457)
Translate language names in the community index list (close #4990)
2019-07-31 13:47:53 -04:00
Bryan Housel
bdb454e1b3 Remove utilCallWhenIdle, use requestIdleCallback/cancelIdleCallback
Places where a reset or connection switch would be problematic,
we can now cancel the callbacks.
2019-05-16 22:28:56 -04:00
Bryan Housel
a8c6ab4d67 Move requestIdleCallback polyfill to id.js, remove utilIdleWorker
`utilIdleWorker` was only used one place.
It just processes a list in an idle callback.

I'm working towards removing the util functions for handling idle work.
We can still do `requestIdleCallback` work throughout the code, however
each place we use it needs to have a strategy for cancellation, which
the existing util functions don't allow for.
2019-05-16 21:19:25 -04:00
Bryan Housel
ec0145de3a Prevent accidental loading of many tiles at low zoom
This could happen because `editable` was checked before the call was scheduled
not before the `loadTiles`.  The user can zoom out more while the call is deferred.
2019-05-16 16:44:19 -04:00
Bryan Housel
ddc9d16b62 Merge pull request #6302 from openstreetmap/text-raw-tag-editor
Text raw tag editor / Copy-paste tags
2019-05-03 14:53:08 -04:00
Bryan Housel
7b4a9a43b0 Change utilTagDiff to return an object with details 2019-05-02 22:59:41 -04:00
Bryan Housel
ff1eea43a8 Remove Google Analytics, also actually export iD.utilDetect 2019-05-02 19:12:39 -04:00
Bryan Housel
ed9a436318 Move common tag diffing code from validators into utilTagDiff 2019-05-02 11:16:15 -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
efcd6b6bc2 Consolidate idle functions into idle.js, defer validation after merge 2019-04-12 10:49:21 -04:00
Bryan Housel
f17ebee402 Use Set, simplify util functions to collect entities with children 2019-04-05 11:05:04 -04:00
Bryan Housel
d18b951c67 Remove lodash flatten and flattenDeep
(re: #6087)
2019-03-28 10:04:46 -04:00
Bryan Housel
3896b2282f Remove lodash isNaN, isNumber, isString, bind, uniqBy
(re: 6087)
2019-03-27 23:11:45 -04:00
Bryan Housel
3d80e6505f Remove lodash chunk, groupBy
(re: #6087)
2019-03-27 16:18:41 -04:00