Forum Discussion

AdladeBabylon's avatar
AdladeBabylon
Community Member
4 years ago

Web object and SL-created shapes

Hello,

We encounter a problem that seems present in at least the last 2 SL360 updates :
some shapes created in SL and that are supposed to be IN FRONT of a web object disappear (i guess they're behind the WO) depending on the size of the browser window. I have attached 2 screenshots of the same slide. In my test, all 3 shapes (red, green and blue) are supposed to show in front of the web object. As you can see, the blue one stays, but the two others don't.
I have tried various shapes : some stay in front and some don't no matter where they're placed on the slide.

The problem is present in chrome (v88.0.1324.104), Edge too.
Firefox (v72.0.2) doesn't seem to show the problem.

Is it something the developpers already noticed ?

Thanks !

  • If you share a Story file someone might be able to troubleshoot it and help. As with the limited info i can get from your screenshot i would say your Webobject forces its z-index to be on top always.

  • I think there is at least a slight possibility that if the web object loads after the shapes appear, it may load on top of the slide. Does it happen if they appear after it loads? If that's the problem, and they have to be visible before it loads, you can probably bring them back to the top. Give them a motion path with zero length and not a relative start. Move them on that path after the object loads, and that should bring them back on top.

  • AdladeBabylon's avatar
    AdladeBabylon
    Community Member

    Hey Walt and Math !

    Thanks for taking the time to answer.


    So, i did multiple tests. If shapes have an entrance animation, they appear on top like they're supposed to and stay on top even when I resize my browser window. I can use this as a workaround.
    But what's really strange to me is that a circle is always where I placed it no matter when it's loaded and without animation, but a square without animation will be visible as expected when viewed in a small window and disappear in full screen.

  • :-) nice wacky behaviour. If you wanted that, it would be hard to achieve :-)

    Whats in your webobject ?

    Have you tried with a very simple one that loads quick ?
    Because i do think loading times and then especially those of the Webobject cause it.

  • Made a quick sample and indeed... it certainly is a bug. As the  Webobject has a z-index of 1 and all the shapes have higher z-indexes when published for Web in the Modern Player. You could force the z-index with javascript, but that should not be needed. Gonna dive somewhat deeper..
    Ps. now loading a PDF in my WebObject, gonna make it smaller so the load is quicker..

  • I now have the simplest HTML in my WebObject and still the same issue...so its not loading... it might have to do with Mobile vs. Desktop..cause when scaling down the browser window it indeed pops up nicely... can't stand it i can not find the exact cause :-)... yet !

  • Well this at least solves it.
    Setting the zIndex to a looooow value and all elements are on top as needed...

    var webObj = document.querySelector("#slide-window > div > div > div > div > div.slide-layer.base-layer.shown > div.slide-object.slide-object-webobject.shown.cursor-hover > div")
    gsap.set(webObj, {css:{zIndex:-50}});

    You need a selector for your WebObject offcourse.

    here is a sample... deactivate the JS trigger and you will see some of the shapes will disappear behind the WebObject indeed.

  • AdladeBabylon's avatar
    AdladeBabylon
    Community Member

    Hi Math 

    Thank you so much for taking the time and finding a workaround ! I'll be sure to use it for the time being.

    Hope the developers can fix the problem though.