Skip to content

Commit

Permalink
Merge pull request #7262 from openstreetmap/multiselect-tag-editing
Browse files Browse the repository at this point in the history
Raw tag editor for multiple select features (2.x)
  • Loading branch information
quincylvania authored Jan 18, 2020
2 parents 57687b5 + 08cfdc3 commit caf3a4d
Show file tree
Hide file tree
Showing 13 changed files with 538 additions and 295 deletions.
8 changes: 1 addition & 7 deletions css/80_app.css
Original file line number Diff line number Diff line change
Expand Up @@ -1245,18 +1245,12 @@ a.hide-toggle {
display: flex;
flex-flow: row wrap;
justify-content: flex-end;
padding: 0 20px;
padding: 5px 0 0 0;
}
.quick-link {
margin: 0 5px;
}

.data-editor .quick-links,
.error-editor .quick-links,
.note-editor .quick-links {
padding: 5px 0 0 0;
}


/* Entity/Preset Editor
------------------------------------------------------- */
Expand Down
6 changes: 5 additions & 1 deletion data/core.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ en:
copy: copy
view_on: view on {domain}
favorite: favorite
list: list
text: text
toolbar:
inspect: Inspect
undo_redo: Undo / Redo
Expand Down Expand Up @@ -555,17 +557,19 @@ en:
edit_reference: "edit/translate"
wiki_reference: View documentation
wiki_en_reference: View documentation in English
key_value: "key=value"
multiple_values: Multiple Values
hidden_preset:
manual: "{features} are hidden. Enable them in the Map Data pane."
zoom: "{features} are hidden. Zoom in to enable them."
back_tooltip: Change feature
remove: Remove
search: Search
multiselect: Selected features
unknown: Unknown
incomplete: <not downloaded>
feature_list: Search features
edit: Edit feature
edit_features: Edit features
check:
"yes": "Yes"
"no": "No"
Expand Down
8 changes: 6 additions & 2 deletions dist/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
"zoom_to": "zoom to",
"copy": "copy",
"view_on": "view on {domain}",
"favorite": "favorite"
"favorite": "favorite",
"list": "list",
"text": "text"
},
"toolbar": {
"inspect": "Inspect",
Expand Down Expand Up @@ -698,18 +700,20 @@
"edit_reference": "edit/translate",
"wiki_reference": "View documentation",
"wiki_en_reference": "View documentation in English",
"key_value": "key=value",
"multiple_values": "Multiple Values",
"hidden_preset": {
"manual": "{features} are hidden. Enable them in the Map Data pane.",
"zoom": "{features} are hidden. Zoom in to enable them."
},
"back_tooltip": "Change feature",
"remove": "Remove",
"search": "Search",
"multiselect": "Selected features",
"unknown": "Unknown",
"incomplete": "<not downloaded>",
"feature_list": "Search features",
"edit": "Edit feature",
"edit_features": "Edit features",
"check": {
"yes": "Yes",
"no": "No",
Expand Down
8 changes: 1 addition & 7 deletions modules/modes/select.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import { modeDragNote } from './drag_note';
import { osmNode, osmWay } from '../osm';
import * as Operations from '../operations/index';
import { uiEditMenu } from '../ui/edit_menu';
import { uiSelectionList } from '../ui/selection_list';
import { uiCmd } from '../ui/cmd';
import {
utilArrayIntersection, utilDeepMemberSelector, utilEntityOrDeepMemberSelector,
Expand Down Expand Up @@ -307,7 +306,7 @@ export function modeSelect(context, selectedIDs) {
.call(keybinding);

context.ui().sidebar
.select(singular() ? singular().id : null, _newFeature);
.select(selectedIDs, _newFeature);

context.history()
.on('change.select', function() {
Expand All @@ -332,11 +331,6 @@ export function modeSelect(context, selectedIDs) {

selectElements();

if (selectedIDs.length > 1) {
var entities = uiSelectionList(context, selectedIDs);
context.ui().sidebar.show(entities);
}

if (_follow) {
var extent = geoExtent();
var graph = context.graph();
Expand Down
Loading

0 comments on commit caf3a4d

Please sign in to comment.