Forum Discussion
Drag-And-Drop Puzzle: Disabling Correct Pieces
I agree with Andrew that splitting all layers into separate slides and utilizing the built-in Drag & Drop interaction feature would improve this interaction. However, the issue with the disabled state persists for unknown reasons. I've included a .story file with two solutions for review.
In the first solution, all puzzle pieces are initially revealed on a separate layer, and draggable pieces are hidden after being dropped. While this solution addresses the disabled state issue, there are some minor visual imperfections, such as visible white spaces when all pieces are revealed. Therefore, I strongly recommend Andrew's solution for #2.
In the second slide, I took a different approach to address these issues. By overlaying the original image under the drop shapes, dropping, for example, the lemon 5 piece onto drop zone 5 hides both, revealing a portion of the original image underneath. To ensure everything aligns correctly, I calculated the dimensions of all draggable pieces and drop shapes based on the original image dimensions. This approach eliminates white lines or misalignments, ensuring a seamless display of the original image once the interaction is complete.
Additionally, I believe it would be preferable for all draggable items to return to their starting positions if not dropped into the correct drop zone. If you don't like it, please feel free to remove the Line motion paths and associated triggers.