Giter VIP home page Giter VIP logo

Comments (5)

Menighin avatar Menighin commented on May 26, 2024

Hi @bjschwarz .
These events you mentioned are configured insite the options on Vis. Therefore we can pass the event in the configuration object on vue2vis. Check this fiddle: https://jsfiddle.net/ygcj2ehb/

We could though emmit an event by default on this but I don't think thats implemented. @alexcode who implemented this may know better.

Regards,

from vue2vis.

bjschwarz avatar bjschwarz commented on May 26, 2024

@Menighin Thanks for the response. I also tried the method you suggested. The problem I ran into is there is no access to the vue object within a callback passed to Vis. The "this" object is not within the functions scope. Any ideas how to get around this?

from vue2vis.

gg-g avatar gg-g commented on May 26, 2024

Hi @Menighin @bjschwarz

Did you manage to find a solution for this?

I have a similar issue. I'm trying to call a Vue method from within a groupTemplate. Same issue - see https://jsfiddle.net/ers37v98/1/

from vue2vis.

alexcode avatar alexcode commented on May 26, 2024

@bjschwarz, an arrow function will share the current scope
onMove: () => alert("move: " + JSON.stringify(this.selectedId)),

https://jsfiddle.net/alexkodo/soung8h2/1/

from vue2vis.

bjschwarz avatar bjschwarz commented on May 26, 2024

@alexcode Thanks for the jsfiddle. I think if all the item data was set on select then the onMove would be accurate for the last selected object. Looks like it should work.

from vue2vis.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.