"Dragged Over" triggers on different layers on the same slide - HTML5

Apr 09, 2018

Having "dragged over" targets on multiple layers of the same slide seems to create a problem if the target areas are the same size and cover the same area. For example, the trigger on layer one seems to work fine until layer two with the identical target area is shown. Even if layer two is subsequently hidden, layer one target seems to be obscured, and the trigger will not work.

To overcome this, I change the shape of the target areas on each layer so they do not cover the same area (X & Y coordinates). I have reviewed other submissions on this forum, and it seems there are other, similar issues around drag and drop, but I did not see this exact issue.

I'm attaching a .story file to illustrate the behavior. Run the preview. The flow will take you from layer 1 to layer 2 and then back to layer 1. The "correct" drag when you return to layer 1 (second time there) is square, but the trigger does not get fired, because the target drag area on layer 2 has obscured it.

Break out of preview, and reduce the "TargetTwo" size so that it is right up against the Target One drag area (use the grey "position only" shape as a guide). Do *not* change the shape of Target One for this test. Re run the preview. When you return to layer 1 (second time there) the "dragged over" trigger now fires as it should, and as it did the first time you were on layer 1.

3 Replies
Leslie McKerchie

Hi Paul,

Thanks for sharing a sample. I do see the behavior you mention.

I see that you have the properties set to not hide the base layer or other slide layers, so I could see where this may become problematic as the layers stack on top of one another.

Does the solution that you shared not work well for you or perhaps utilizing multiple slides would work for your design?

Just let me know what your thoughts are.

Paul Kizilos

Thanks for your reply.

I agree that a different design using multiple slides (instead of multiple layers) would be a better way to go, rather than stacking layers with overlapping dragged over targets. My solution will be useful in my situation where we have a library of content that is designed using multiple layers.

In my example, I am hiding and showing layers with triggers. I recall a post in this forum stating that all layers are loaded at the start anyway, but are set to be hidden until they are shown. I believe for HTML5, Javascript is used to toggle the display attribute of layers. Somehow, even though a layer may be hidden, drag and drop target coordinates on a layer remain in effect even after the layer is hidden.

Out of curiosity, I tested your theory by setting the properties on each layer to hide other layers and the base layer. Same results. This tells me that overlapping drag and drop targets on multiple layers of the same slide do interfere with each other when published to HTML5.

Now that I understand the issue, I just thought it would be helpful to others who may experience this behavior under similar conditions.

Ashley Terwilliger-Pollard

Hi Paul,

I also took a look at your file to try and determine if there was a bug here with the drag over elements and layers, so I created a much more simple version focused solely on the Drag over element and how it would interact with drop areas on layers. I previewed it and published to Review to see it in a browser - and both experiences don't show any conflicts with how the drag items interact with their own layers and the individual drop targets. You'll see the drag items states are changing only when dragged or dropped over their respective target. 

This simplified version seems to be working normally, so it could be an additional element in terms of your triggers to adjust variables and show layers based on that, and that the variables aren't being calculated correctly. I wanted to at least confirm that we didn't have a bug there.

As Leslie mentioned, the drag/drop behavior may be best on individual slides and that's how Storyline is designed with the drag and drop interaction solely on the base slide. 

Let me know if you have any other questions, but often with things like this, we tend to over complicate it. ;-) 

This discussion is closed. You can start a new discussion or contact Articulate Support.