I was inspired by today’s Lockdown Learning Series presentation and looked at 
adding swipe gestures to a current project. This whole process made WAY more 
sense after re-watching Michael’s presentation (I saw it live too, but was over 
my head last year). I’m struggling with a large DG. I’ve got my custom swipe 
controls working and triggering custom swipe actions. But I’m having problems 
with my mouseDown.

If there is a swipe control open and you tap a different visible row, the open 
swipe control is closed (with or w/o animation). 
If there is a swipe control open and the DG scrolls to a point where that 
control is no longer on-screen, that swipe control doesn’t close even though a 
new row is highlighted. 

The closest workaround I could come up with was to check for vertical scroll 
and just kill all swipe controls. Is this expected behavior or bug?

on scrollerDidScroll pHScroll, pVScroll
        if pVScroll > 50 then
                dispatch "RowSwipeHideControl" to group "DataGrid" with TRUE
        end if
end scrollerDidScroll

The highlighted row when scrolling is a separate bug patched by Mike Wieder  
https://quality.livecode.com/show_bug.cgi?id=22798 
<https://quality.livecode.com/show_bug.cgi?id=22798> awaiting a GitHub merge, 
but turning on delayTouches makes the swipe animation jerky because the 
scroller has to decide if it’s scrolling first so the swipe controls aren’t 
very responsive. Would be curious if these two things can live in harmony. Any 
DG2 advice?

-Andrew Bell
_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to