question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Image is not draggable on Canvas.

See original GitHub issue

I am using Fabric.js for my Image Editing App based on Angular 15.

My html draggable="true" is not working on mobile Screens. I found your polyfill. after adding it i am able to drag my images but its not going onto Canvas. Dragging stops when my touch reaches to canvas element. apart from canvas element i can drag my image anywhere.

Issue Analytics

  • State:closed
  • Created 9 months ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
Bernardo-Castilhocommented, Dec 29, 2022

Excellent, congratulations on finding the root of the problem!

You should be able to get the pointer position using the event’s clientX and clientY properties.

0reactions
Saqib92commented, Dec 29, 2022

Excellent, congratulations on finding the root of the problem!

You should be able to get the pointer position using the event’s clientX and clientY properties.

Yes I figured that out. Thank you for this Great Help and Library. Really Appreciate.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Make image drawn on canvas draggable with JavaScript
To do dragging you handle 3 mouse events: mousedown -- set a flag indicating that the drag has begun. mouseup -- clear that...
Read more >
Drag image on HTML Canvas with JavaScript - YouTube
Learn how to drag image on HTML Canvas with JavaScript. We're building on the last episode where we used the bitmoji API to...
Read more >
HTML5 Canvas Drag and Drop an Image - Konva
To drag and drop an image with Konva, we can set the draggable propertyto true when we instantiate a shape, or we can...
Read more >
Dragging an Image in HTML5 Canvas - CodePen
1. <h1>Click Image then Drag</h1> ; 2. <canvas id="canvas" width="500" height="500" style="border: 1px solid black"></canvas>.
Read more >
Solved: Re: When I drag a object onto a new canvas, the ne...
I noticed another issue and tried to troubleshoot it and then discovered why my layers were not working. The problem: Image Canvas Size....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found