Jump to content

Access value in onDragStart function


Recommended Posts


I'm looking to access to a value (boolean) who is defined above in my code .

But in onDragStart function it's not possible.

I use Vuejs and props to pass value between components.

                function onDragStart(event) {
                    this.data = event.data;
                    this.alpha = 0.5;
                    this.dragging = true;

                function onDragEnd() {
                    this.alpha = 1;
                    this.dragging = false;
                    this.data = null;

                function onDragMove() {
                    if (this.dragging) {
                        const newPosition = this.data.getLocalPosition(this.parent);
                        this.x = newPosition.x;
                        this.y = newPosition.y;

I need to add a condition, if the value is true this.dragging = true else this dragging = false






Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...