import delegate from 'delegate';

delegate(document, '.annotate.note', 'click', e => {
  let annotationId = e.target.dataset.annotationId;

  document.querySelector(`.annotate.note-content-wrapper[data-annotation-id="${annotationId}"]`)
  .classList.toggle('revealed');
});


delegate(document, '.note-icon', 'click', e => {
  let annotationId = e.delegateTarget.dataset.annotationId;
  
  document.querySelector(`.annotate.note-content-wrapper[data-annotation-id="${annotationId}"]`)
  .classList.toggle('revealed');
});

delegate(document, '.note-content', 'input', e => {
  stageChangeToAnnotation(e.target.parentElement.previousElementSibling, {content: e.target.innerText});
});

@@ -518,167 +518,4 @@
 %0A%7D);
-%0A%0Adelegate(document, '.note-content', 'input', e =%3E %7B%0A  stageChangeToAnnotation(e.target.parentElement.previousElementSibling, %7Bcontent: e.target.innerText%7D);%0A%7D);%0A

Revert "WIP trying to get save/cancel menu to show when typing in note content box."