mirror of
https://github.com/FoggedLens/iD.git
synced 2026-03-22 02:53:35 +00:00
Make top toolbar item spacing more consistent
Prepare top toolbar to be more dynamic
This commit is contained in:
@@ -29,8 +29,18 @@ export function uiNotes(context) {
|
||||
return context.map().notesEditable() && mode && mode.id !== 'save';
|
||||
}
|
||||
|
||||
context.keybinding().on(mode.key, function() {
|
||||
if (!enabled(mode)) return;
|
||||
|
||||
if (mode.id === context.mode().id) {
|
||||
context.enter(modeBrowse(context));
|
||||
} else {
|
||||
context.enter(mode);
|
||||
}
|
||||
});
|
||||
|
||||
return function(selection) {
|
||||
|
||||
context
|
||||
.on('enter.editor.notes', function(entered) {
|
||||
selection.selectAll('button.add-button')
|
||||
@@ -45,16 +55,6 @@ export function uiNotes(context) {
|
||||
.classed('mode-' + exited.id, false);
|
||||
});
|
||||
|
||||
context.keybinding().on(mode.key, function() {
|
||||
if (!enabled(mode)) return;
|
||||
|
||||
if (mode.id === context.mode().id) {
|
||||
context.enter(modeBrowse(context));
|
||||
} else {
|
||||
context.enter(mode);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
var debouncedUpdate = _debounce(update, 500, { leading: true, trailing: true });
|
||||
|
||||
|
||||
Reference in New Issue
Block a user