 editAnnotation = (region) ->
   form = document.forms.edit
   form.classList.remove 'hide'
-  form.elements.start.value = round100(region.start)
-  form.elements.end.value = round100(region.end)
+  form.elements.start.value = round1000(region.start)
+  form.elements.end.value = round1000(region.end)
   form.elements.note.value = region.data.note or ''
   if region.data.type == 'segment'
     form.elements.note.setAttribute('disabled', 'disabled')

wavesurfer.setMarker = (time, text) ->
  time ||= wavesurfer.getCurrentTime()
  text ||= ''
  wavesurfer.addRegion(start: round100(time), drag: true, resize: false, data: { type: 'segment_item', note: text }, color: 'rgba(0,0,0,0.5)')

regionsArray = ->
  mapped = Object.keys(wavesurfer.regions.list).map((id) ->
    region = wavesurfer.regions.list[id]
    {
      region_id: id
      start: round100(region.start)
      end: round100(region.end)
      data: region.data
      texts: []
      drag: (if region.data.type == 'segment_item' then true else false)

  time ||= wavesurfer.getCurrentTime()
  # Assume that time is always within a region, since we initialize a region over full audio at start
  splitCandidate = this.getRegionsAt(time)[0]
  wavesurfer.addRegion { start: splitCandidate.start, end: round1000(time), drag: false, resize: false, data: { type: 'segment' }, color: randomColor(0.3) }
  wavesurfer.addRegion { start: round1000(time), end: splitCandidate.end, drag: false, resize: false, data: { type: 'segment' }, color: randomColor(0.3) }
  wavesurfer.regions.list[splitCandidate.region_id].remove()

wavesurfer.getRegionsAt = (time) ->
