actually i can’t test, but should at least be supported natively in safari since 12.1 (mobile 12.2): https://caniuse.com/#feat=intersectionobserver
Ah okay. I was always bundling it with the polyfill but then for some strange reason I got Safari 12 running Mojave. Might need to-do something to get 12.1 although I am being nagged about an update to Catalina by Mac OS and still am hesitant as my laptop is from 2014.
I did an update on the ‘HypeDragAndDropEnabler’. Drag and drop for Hype without touching code …
file: jungle_lodge.hype.zip (615.9 KB)
configuration within hype -> attributes panel
data-drag -> should be true data-drop -> class ... of elements that should allow drop for this element data-dropsnap -> true ... to snap to left and top of droppable element data-dragreverse -> true ... reverse dragelement if no drop was possible
one special attribute for a puzzle-mode:
`data-onpuzzlesolved -> name of a custumbehavior to execute when all possible drops have been done`
data-dropcustombehavior -> name ... of a custumbehavior to execute on drop data-intersectcustombehavior -> name ... of a custumbehavior to execute on intersection data-intersectoffcustombehavior -> name ... of a custumbehavior to execute on intersection off
while previewing in the browser you can use the console to check and verify the events and the called custombehaviours:
please checkout and report issues
Some great examples here @h_classen!
adaption for a special case that requires only one drop at a time and resetting old drops:
Perfect instructions, thank you very much! I have programmed a game in which you have to assign three animals to their tracks. if all are assigned, a text (eg “Bravo !!!”) should appear. Could you tell me how to program that? Thank you so much!
Perfect instructions, thank you very much! I have programmed a game in which you have to assign three animals to their tracks. If all are assigned, a text (eg “Bravo !!!”) should appear. Could you tell me how to program that? Thank you so much!
you can set a data-attribute: “
data-onpuzzlesolved” to one of your drag-elements and as value a name of a custombehaviour you like to trigger …
Thank you for your response! Sorry, my English is not very good. A
the custombehaviour should execute if all drags are on the board …
i see four pictures on the screenshot? three answers!?
so, it’s not right clear to me … perhaps providing a hypefile can help
perhaps you’re expecting another behaviour …
thank you for your help. one of the animals on the left is working on two pictures. therfore 3 animals and 4 pictures. the hype file is to big for sending here…but I think I am near to solve it!
After hours of work, I’m unfortunately not further. Would it be possible to send you the hype file via we transfer? That would be really nice!
you can paste the link here? cause i don’t support privatly
does not need to be the original document … just a rebuilt for the usecase …
I will try! THx
Quiz1 Kopie.hype.zip (2.1 MB)
Quiz1 Kopie.hype.zip (2.1 MB)
you’ve had an outdated script … sry you hit this …
Oh! Thank you so much!!! What does this mean: an outdated script? Do I have to update the software?
ah no … the dragenabler. latest one’s been the jungleLodge above …
ok. Once again: thank you very much!!!