WIP: update service calls; todo: note update event handling

This commit is contained in:
Thomas Hervey
2018-07-10 13:50:36 -04:00
parent c460c03da5
commit eafae6c58c
3 changed files with 71 additions and 46 deletions
+12 -1
View File
@@ -11,6 +11,8 @@ import {
behaviorSelect
} from '../behavior';
import { svgNotes } from '../svg';
import { services } from '../services';
import { modeBrowse } from './browse';
import { uiNoteEditor } from '../ui';
@@ -24,7 +26,16 @@ export function modeSelectNote(context, selectedNoteID) {
var osm = services.osm;
var keybinding = d3_keybinding('select-note');
var noteEditor = uiNoteEditor(context);
var noteEditor = uiNoteEditor(context)
.on('updateNote', function() {
// .call(drawNotes); // TODO: update and redraw notes
var note = checkSelectedID();
if (!note) return;
context.ui().sidebar
.show(noteEditor.note(note));
});
var behaviors = [
behaviorHover(context),
behaviorSelect(context),