mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-16 13:59:27 +02:00
select note before rendering sidebar
This commit is contained in:
@@ -51,8 +51,6 @@ export function behaviorHash(context) {
|
||||
var newParams = {};
|
||||
|
||||
delete q.id;
|
||||
console.log('TAH - hash: context.selectedIDs()', context.selectedIDs());
|
||||
console.log('TAH - hash: context.selectedNoteID()', context.selectedNoteID());
|
||||
var selected = context.selectedIDs().filter(function(id) {
|
||||
return !context.entity(id).isNew();
|
||||
});
|
||||
|
||||
@@ -111,8 +111,6 @@ export function modeDragNote(context) {
|
||||
|
||||
|
||||
function start(entity) {
|
||||
console.log('TAH - drag_note start()');
|
||||
|
||||
context.perform(actionNoop());
|
||||
|
||||
_activeEntity = entity;
|
||||
@@ -158,12 +156,10 @@ export function modeDragNote(context) {
|
||||
osm.replaceNote(entity); // update note cache
|
||||
}
|
||||
dispatch.call('change', this, 'difference');
|
||||
console.log('moved: ', entity.loc);
|
||||
}
|
||||
|
||||
|
||||
function end(entity) {
|
||||
console.log('TAH - drag_note end()');
|
||||
context
|
||||
.selectedNoteID(entity.id)
|
||||
.enter(modeSelectNote(context, entity.id));
|
||||
|
||||
@@ -80,6 +80,7 @@ export function modeSelectNote(context, selectedNoteID) {
|
||||
} else {
|
||||
selection
|
||||
.classed('selected', true);
|
||||
context.selectedNoteID(selectedNoteID);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -100,13 +101,13 @@ export function modeSelectNote(context, selectedNoteID) {
|
||||
d3_select(document)
|
||||
.call(keybinding);
|
||||
|
||||
selectNote();
|
||||
|
||||
context.ui().sidebar
|
||||
.show(noteEditor.note(note));
|
||||
|
||||
context.map()
|
||||
.on('drawn.select', selectNote);
|
||||
|
||||
selectNote();
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user