Skip to main content
Inspiring
April 5, 2022
Question

HTML Canvas - Comboboxes layer issue

  • April 5, 2022
  • 1 reply
  • 120 views

I have a layer above some comboboxes.  However, the comboboxes always appear ontop of other layers at run time. 

 

 

Is there a way to restrict the rendering of the comboboxes at their assigned layer?

    This topic has been closed for replies.

    1 reply

    kglad
    Community Expert
    Community Expert
    April 6, 2022

    not if you use the adobe components because components are placed on a layer above the canvas.

     

    otoh, you could create your own components using js. for a combobox:

     

    var d = document.createElement("div");

    document.getElementById("animation_container").appendChild(d);
    document.getElementById("animation_container").appendChild(canvas);  // make sure your canvas is transparent
    d.display = "inline-block";
    d.id = "cb_"+id;

     

    for(var i=0;i<dataA.length;i++){  //  dataA = your jason array

    var optionItem = document.createElement("option");
    
        optionItem.text = dataA[i].label;
        optionItem.value = i;
    
       d.options.add(optionItem);
    }