mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-13 09:12:52 +00:00
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';
This commit is contained in:
@@ -18,6 +18,11 @@ export function uiCommitChanges(context) {
|
||||
var detected = utilDetect();
|
||||
var _entityID;
|
||||
|
||||
var _discardTags = {};
|
||||
context.data().get('discarded')
|
||||
.then(function(d) { _discardTags = d; })
|
||||
.catch(function() { /* ignore */ });
|
||||
|
||||
|
||||
function commitChanges(selection) {
|
||||
var history = context.history();
|
||||
@@ -96,7 +101,7 @@ export function uiCommitChanges(context) {
|
||||
|
||||
// Download changeset link
|
||||
var changeset = new osmChangeset().update({ id: undefined });
|
||||
var changes = history.changes(actionDiscardTags(history.difference()));
|
||||
var changes = history.changes(actionDiscardTags(history.difference(), _discardTags));
|
||||
|
||||
delete changeset.id; // Export without chnageset_id
|
||||
|
||||
@@ -158,9 +163,9 @@ export function uiCommitChanges(context) {
|
||||
}
|
||||
|
||||
|
||||
commitChanges.entityID = function(_) {
|
||||
commitChanges.entityID = function(val) {
|
||||
if (!arguments.length) return _entityID;
|
||||
_entityID = _;
|
||||
_entityID = val;
|
||||
return commitChanges;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user