My HTML5 application lets you drag and drop images from another webpage. But when using PC in tablet mode I cannot seem to drag images, surely this must be possible in 2018?
If it really is not possible, what alternative mechanism can I use to allow User to use the image from another website?
To drag. Put a finger on the desired point on the touch screen and slide the finger. You can move a file or change the window size with this motion.
Drag and drop feature allows you to take control of a html element by grabbing it and dragging and placing the element to a different location. To work with drag and drop features in Mobile Angular UI, you need to add the gestures module.
: to not drink any alcohol He used to have a drinking problem but he hasn't touched a drop in years.
please look this:
var draggable = document.getElementById('draggable');
draggable.addEventListener('touchmove', function(event) {
var touch = event.targetTouches[0];
// Place element where the finger is
draggable.style.left = touch.pageX-25 + 'px';
draggable.style.top = touch.pageY-25 + 'px';
event.preventDefault();
}, false);
also, Here is a tutorial: http://mobiforge.com/design-development/touch-friendly-drag-and-drop
Please let me know if it works or if you need any more help
with that :)
Edit: Here is a jsfiddle with a test I built a while before. I've updated it with comments so you should see what's going on there. Maybe a JavaScript pro would want to hit me for this, but it's working for my purpose and I it seems to work. I haven't tested it in older browsers though, since it's a personal project and I'm not going the "optimizing for IE way" there
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With