A
A
antanol2021-01-10 02:16:20
css
antanol, 2021-01-10 02:16:20

How to place a block on top of the canvas?

I am writing a small pet project a la paint.
By clicking on the brush, a submenu opens for me, but it is not visible under the canvas.
z-index on the submenu layer above is not done (I tried with canvas z-index: auto and z-index: 0).
If you change the canvas z-index to -1, then the submenu becomes visible normally, but the functions that hang on the canvas (cursor tracking, drawing) stop working.
Is it possible to somehow change the order of the layers without throwing the drop-down menu code below the canvas (which breaks my beautiful structure)?

5ffa375ddf865063437175.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
sashabeep, 2021-01-10
@antanol

Change canvas z-index only when popup is open and return back. Yes, the interaction area will suffer, or move popups inside the object

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question