InteractiveMechanics / nmai-nk360-interactives

0 stars 0 forks source link

[1] Cards and device orientation switching #650

Closed amberreeves closed 6 years ago

amberreeves commented 6 years ago

Selecting the first card locks in the orientation behavior for all the cards, regardless of changes made to the device’s orientation afterward. For example, if the user starts the module in portrait orientation, then selects a card, the cards will then behave as if in portrait orientation even when the device is switched to landscape orientation. Even though the module is still technically playable by double tapping answers at the bottom of the screen, the card dragging functionality is removed.

Starting the module in landscape orientation and selecting a card makes all the cards behave in landscape mode, even in portrait orientation, allowing the cards to be dragged around for no purpose.

To reproduce: 1 Select “Continue This Activity” 2 Close the opening informational card 3 Select any card 4 Rotate device to landscape orientation 5 The display changes to prompt the user to drag the cards, but now none of the cards can be dragged.

From Mike: can we add in a window resize event for any JavaScript calls that run for sizing/positioning?

cahdeemer commented 6 years ago

I think this issue may be confined to the iPad Pro (12.9"), as the drag-and-drop functionality does not exist on iPads or iPad Pros(10.5").

This is because drag-and-drop functionality only exists if the window is greater than 1199px (puzzle.js, line 419).

In any case, I added events for resize and orientation change.