March 19, 2020, 8:11am
Can anyone help me add something to this script that will stop the copy from being swipped out of the copy window?
I like how I have a “scrollable” copy window that I can dump a whole lot of copy in but I’d like it to stop and not scroll infinitely.
SwipeCopy.zip (162.7 KB)
March 19, 2020, 9:52am
scrollHeight will return the height of the content of the overflowed element.
so you can calculate the drag distance against it …
March 19, 2020, 3:14pm
Thanks Hans, but I don’t know how to move on from that advice.
I’m not much of a programmer/coder, so a little more clarity would be super great.
Perhaps tell me what I can add to the “Dragvert” JS function in the hype document?
I googled Scrollheight but that slowed me down reading through stuff i don’t really get.
Thanks in advance
March 19, 2020, 3:40pm
btw why don’t you use scroll instead?
swipe_maxScrollHeight.hype.zip (118.8 KB)
March 20, 2020, 12:35am
ok next question: how can I use scroll without the scrollbars being visible? How can I turn off scrollbars display without turning off the function
March 20, 2020, 7:09am
mask them by a parent element -> group.
scrollmask.hype.zip (22.2 KB)
March 20, 2020, 9:25am
tried that, didn’t work - still see scrollbars
March 20, 2020, 9:47am
actually can’t test on iOS, but desktop chrome and android chrome seem to be ok …