Skip to content

Resolve: Create mixin to pull data from backend

Böhm, Jean requested to merge 1539-data-stream-from-backend into cotanz

Closes #1539 (closed)

@christian.hansen @isabela.dimarco @milan.gress The Mixin is called ContinuousGroupPull.js. It can be use like this:

export default {
  
  mixins: [ContinuousGroupPull],
  
  mounted () {
    // Starts an Interval which pulls new Annotations every 5 sec. Interval ends in beforeDestroy () {}
    this.initContinuousPull(groupId)
    // the data can be seen in `this.latest` = { group, maps, annotations }
    console.log(this.latest)
    // New annotations are always pushed to this.latest.annotations
  }
}
Edited by Isabela Dimarco

Merge request reports