Closed lavrton closed 6 years ago
Is there an option to reverse this order? Since the convention is that the element on the top will have higher zIndex than the elements on the bottom. Thanks!
Since the convention is that the element on the top will have higher zIndex than the elements on the bottom
I don't know such a convention. DOM works in the same way as described above.
Since the convention is that the element on the top will have higher zIndex than the elements on the bottom
I don't know such a convention. DOM works in the same way as described above.
My apologies. I am using react-konva to develop a Photoshop-like photo editing tool. I meant the convention in Photoshop. Anyway, would a PR that implement such feature be appropriate here?
No, we don't need to rever the order from react-konva
side. If you need to revert it, you can do it manually from your render()
function.
In pure
Konva
framework, we havezIndex
property. It is very useful to change order of elements with that property:In
react-konva
the order of elements will be defined as it is defined inrender()
function of a component:We may have unexpected result if we will use two logics of ordering at the same time:
So my suggestion is to NOT use
zIndex
attrube inreact-konva
. Just reorder nodes in render().