Currently working on a puzzle game in JavaFX which displays pieces to play on screen and when you scroll over them, they rotate. This works fine but right now they only rotate in one direction, how do I find out whether the mouse is scrolling up or down?
Related
I'm building a reactjs widget which has scrollable lists (vertically) inside it, which takes the entire viewport on mobile (I prevent the default for "touchmove" on the window so as not to scroll the background).
But when I open the widget on iPhone (tested on both Safari and Chrome), I can scroll down the list, but can't scroll back up! if I want to scroll back up, I need to scroll a bit down before I scroll up (one action, without lifting the finger).
I also have reversed lists (same design, only with flex-direction: column-reverse), and I have the exact same behavior regardless of the flex direction.
I also noticed that the "touchmove" event on the list is not firing when I can scroll, but it is firing when I can't.
It works great on desktop, tablets (iPad as well) and android devices - just not on iPhone.
I need the scroll to work both ways on iPhone as well
It was my mistake - it was a combination of using body-scroll-lock and preventDefault of "touchmove" on the body.
All fixed now
Hi I’m a new developer that just graduated school so I’m working on a portfolio project. Sorry in advance if the question seems dumb.
I have a carousel showing a gallery of images at the top of my screen and a vertical flat list for the second (bottom) half.
How do I get the bottom half to take the full screen on swipe up and go back to half screen on swipe down? react-native-gesture-handler only offers swipeable left or right and not up and down.
You need to play around with flex. Apply flex on parent view with value in between 0-1 and change it accordingly on swipe. To detect swipe in react native, follow link below
https://dev-yakuza.posstree.com/en/react-native/react-native-swipe-gestures/
(On mozilla firefox), if you click on the scroll bar on the right of the screen and hold it down, when you move up and down whilst holding the mouse down, it doesn't matter whether your mouse is on the program itself or not. You can click and hold on it and move your mouse to another display entirely and the program will still scroll up and down a webpage.
I am trying to do the same thing in SDL2 with a program, but when I made a scroll bar, as soon as I mouse off the application it stops and freezes in the Y location that it was before I moused off the display.
I have trouble making an embedded google map work properly on mobile devices. It is within a div box and set to 100% height/width and works as inteded when not on mobile phones. On phones it adds a big square-shaped button with an arrow in it in the bottom right corner which consequently shrinks the map size in the div to about half. When I click the mysterious button, nothing happens. So, an annoying button with no function. When I touch the map, the button disappears and the div is filled though. Anyway to get rid of that button?
I'm building an application in Flex and I have few windows with scroll. When I'm trying to use mouse scrollwheel the window does not scroll up/down. Plus if it is possible to make the window to scroll up/down then is it possible to make to scroll right/left.
in as3 there is a mouseevent.mouse_wheel event. Listening for this will yield property delta. the delta property wil tell you if your mousewheel is scrolling up or down. unfortunately this doesnt work with macs. Fortunately, there are some classes out there [internet land] that address this.
re the second bit, side to side, i imagine you could harness an up/down motion to move a scroller left/right, but i dont think thats what your after.
Correct.
This guy made it possible. Some examples and explaination: http://blog.pixelbreaker.com/flash/as30-mousewheel-on-mac-os-x/