Grid "z-index", show above elements. #1718
-
Is it possible to make the grid appear above the elements instead of behind them? If so, how? |
Beta Was this translation helpful? Give feedback.
Answered by
kumilingus
Jul 6, 2022
Replies: 1 comment 3 replies
-
const gridEl = paper.el.querySelector('.joint-paper-grid');
gridEl.style.pointerEvents = 'none';
gridEl.style.zIndex = 1;
const pathEl = V('path', { fill: 'none', stroke: 'gray', d: myFunctionToDrawGrid(gridSize) }).node;
paper.getLayerNode(dia.Paper.Layers.BACK).appendChild(pathEl); (Note that even though the layer API is not completed yet it's safe to use) |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
BigPackie
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
linkTools
,elementTools
,ui.Halo
,ui.Selection
).SVGPathElement
(orSVGRectElement
withSVGPatternElement
) and append it to one of the paper layers (It is a similar approach used in Hexagonal Grid demo).(Note that even though the layer API …