Commit Graph

244 Commits

Author SHA1 Message Date
Quincy Morgan
5f93da5a59 Add a reusable function for calculating the combined extent of multiple entities (re: #7706) 2020-06-16 13:17:43 -04:00
Quincy Morgan
0473243930 Add workaround for broken rapid tapping on iOS 13.4+ (close #7694) 2020-06-15 12:27:53 -04:00
Quincy Morgan
2064f7a2f7 Update util function comments 2020-06-10 12:44:10 -04:00
Quincy Morgan
d01f1598d3 Show the delete button for filled multilingual name fields even if no name tag is present (close #7572)
Focus the language input when clicking a multilingual name field label instead of deleting the value
Be more lenient with `utilUniqueDomId` function input
2020-06-10 10:35:03 -04:00
Quincy Morgan
762307bd7d Restrict key, value, and role character limits based on unicode characters, not UTF-16 code units (re: #6817) 2020-06-09 15:41:15 -04:00
Quincy Morgan
572ce0a787 Make sure horizontal-only scroll events can be translated into map pans (close #7659) 2020-06-04 13:29:45 -04:00
Quincy Morgan
a5091c3bd0 Account for pointerId and simplify position calculations in doubleUp (re: #7611) 2020-05-18 09:58:15 -04:00
Quincy Morgan
67bef3a692 Add sameSite=strict attribute to lock cookies (close #7596) 2020-05-13 09:37:12 -04:00
Quincy Morgan
5a8f573889 Continue zoom/pan of map when a down pointer moves off the map (re: #5505)
Fix possibly #6745
2020-05-08 15:30:38 -07:00
Quincy Morgan
509ee8fe65 Import function from module instead of file 2020-05-08 15:03:03 -07:00
Quincy Morgan
d16aa01afd Fix occasional console error 2020-04-02 12:40:41 -07:00
Quincy Morgan
0120b009fa Take a graph parameter in utilDisplayLabel instead of the context 2020-04-01 13:29:17 -07:00
Quincy Morgan
60f7dc7c0b Replace presets property of context with singleton
Remove utilPreset
2020-04-01 13:08:45 -07:00
Quincy Morgan
a1af118f0e Ensure locales and presets are loaded before the UI loads (close #7406)
Consolidate localization behavior and init to a coreLocalizer function and singleton
Explicitly support `en-US` locale
Rename coreData to coreFileFetcher and export a singleton rather than using a property of coreContext
Add `apiConnections` property of coreContext to simplify adding a source switcher
Replace some init functions with re-callable, promise-supporting `ensureLoaded` functions
Make coreContext itself load the UI if a container has been specified at init time
Fix code tests
2020-03-31 12:23:31 -07:00
Quincy Morgan
d8585ae2fb Fix lint warning 2020-03-29 10:55:32 -07:00
Quincy Morgan
eec1a23388 Fix RTL mouse coordinate calculation issue 2020-03-29 09:54:02 -07:00
Quincy Morgan
5195d8d95b Don't use d3_mouse and cache client rect values as needed (close #7489) 2020-03-28 16:32:38 -07:00
Quincy Morgan
4addcc961d Discount right-clicks during double up detection 2020-03-26 13:27:15 -07:00
Quincy Morgan
f1d1bfa402 Improve utilDoubleUp comment 2020-03-25 09:48:20 -07:00
Quincy Morgan
d62a62cba8 Make popover and tooltip part of the UI module instead of utils 2020-03-24 17:32:09 -07:00
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