Upvote 2

Using the event "on drag start", auto-scroll doesn't work within a dynamic panel anymore on device.

Known Vanvan Song 7 years ago

- Android Device / Newest version of Justinmind- At the beginning, I was trying to use an event like "on Scroll up" but couldn't find one. So I use the event "on Scroll" to move the panel, but it didn't work (Move).

- Then I tried using the event "on drag start" to move the Dynamic Panel X, auto-scroll doesn't work within Dynamic Panel X anymore on the device. However, it does work in the simulator.

- As a result, I used the event "on Swipe Up" and it works - the panel moves and is still scrollable. However, the experience doesn't meet my expectation - it's difficult to trigger the event while the user is actually scrolling...

Replies (5)
photo
1

Hi VanVan,


We're sorry that your are encountering this. If possible, please send me a snippet of your prototype so I can test it and see what might be happening.


Best,


Sonia Durán

photo
1

I am using below code :


var stop = true; $(".draggable").on("drag", function (e) { stop = true; if (e.originalEvent.clientY < 150) { stop = false; scroll(-1) } if (e.originalEvent.clientY > ($(window).height() - 150)) { stop = false; scroll(1) } }); $(".draggable").on("dragend", function (e) { stop = true; }); var scroll = function (step) { var scrollY = $(window).scrollTop(); $(window).scrollTop(scrollY + step); if (!stop) { setTimeout(function () { scroll(step) }, 20); } }


can you check and please let me know what's wrong.

photo
1

Below is my HTMl Code:


<div id = "content">

<img src = "http://images2.wikia.nocookie.net/__cb20100520131748/logopedia/images/thumb/5/5c/Google_logo.png/300px-Google_logo.png" class="draggable">

</div>

photo
1

Hi Tushar,


By snippet I mean the vp file you have created.


Best,


Sonia Durán

photo
1

actually i face some problem i extremely need some help, i create this prorotype but the problem is at the screen number 13 i create an event [(on drag) (move)] but after creating , while i simulate , the drug and move option doesn't work.. please help i upload a .vp file in this zip file.. please help me

photo
1

Hi there,

Your post will be attended through the following thread

https://www.justinmind.com/community/topic/on-drag-move-event

Please, if possible, try to not duplicate subjects.

Best,

Sonia Durán

photo
Leave a Comment
 
Attach a file