[Vuejs]-How can i use the method like "paper.on('cell:pointerdblclick', function (cellView){})" in a vue file?

0๐Ÿ‘

โœ…

As i understood from the question, you want to pass the first argument of callback to your method. Seems like your syntax is wrong. You are just calling your method with an undefined variable. To access this variable try the code bellow (arrow function is used to save the context). Also, I believe you have connectTwoObject method defined in your methods.

export default {
  mounted() {},
  methods: {
    registerDoubleClickEvent() {
      this.paper.on('cell:pointerdblclick', cellView =>
        this.connectTwoObject(cellView),
      )
    },
  },
}

Leave a comment