Set Current object ONTOP

  • Hi, I looking for how to put the current layer (ex. a custom window formed with container layer, buttons, textfield, etc.) ontop in relation with all others layers.


    I think to assign a lower zorder to all except the current that would be the maxime zorder.

    The problem is in the current objects and the others formed for container layer, is need to assign any custom property to filter and temporally (while the current objet is visible) to lower the zorder... Look complicated. but it is a very typical scenary in any project.

    Please, I want to listen others theoretical soutions about this comun problem.

    Thanks at advanced,

    Fernando.

  • Hi

    here's a code i wrote to do that on onover, be inspired ;)

  • Thanks Rebaj83 for your answer, That it very interesting:

    Your code search all zorder > 0 and increment 1 to greater zorder value found for set it to target layer.
    Sometimes in some projects I used zorder=100 to put on top any layer, in this case the code no works in html5 due to limit 100. The 100 limit is the problem for any similar code. I will try it and comment after.

    Very grateful,

    Fernando

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!