4 ms·
Nicely polished, I like it. EDIT: Turns out the following behavior is intentional, but I'll leave the statement here so the child comments make sense. I wante
by jesse__ 4y ago
Nicely polished, I like it.
EDIT: Turns out the following behavior is intentional, but I'll leave the statement here so the child comments make sense.
I wanted to point out what may be a bug .. if I quickly drag a face-down card off the deck and release the LMB right away, it flips face-up, however if I leave the mouse button depressed for ~0.5s, it stays face-down. Maybe this is intentional, but I feel like it's a bit of a weird behavior either way.
Chrome 111/Windows.
Anyway, thanks for sharing :)
- cypherpunks01 4y agoI think it's a feature, works really nicely on a phone - if you tap, flick the card and quickly release, it lands face up as if you're throwing the card on the table as you deal. Whereas if you drag it more slowly into place, it will remain face down as if you are sliding it on the table. Feels pretty natural on touchscreen.
- deleted 4y ago[deleted]
- throwbadubadu 4y ago200 ms to be precise, definitely feature (a reasonable one) and not a bug (: card.js confirms: if (isFlippable && Date.now() - starttime < 200) { // flip sides
- bscphil 4y agoI don't think that confirms this is not a bug. It's a function that runs on the `mouseup` event, so it's presumably intended to activate on clicks that last less than 200 ms (anything longer is considered a click and drag). This issue triggers as a result of unexpected behavior - a click and drag that lasts less than 200 ms.
- 8n4vidtmkvmk 4y agowhenever i implement 'click' i always check that the final pos of the mouse is within a few pixels of the starting position.
- pkstn 4y agoThat is better way to do it, i should fix it
- deleted 4y ago[deleted]
- deleted 4y ago[deleted]