17 lines
488 B
Markdown
17 lines
488 B
Markdown
---
|
|
title: useLayerDrag
|
|
description: Drag-and-drop wiring helper for layer tree reordering.
|
|
---
|
|
|
|
# useLayerDrag
|
|
|
|
`useLayerDrag(editor, indentPerLevel?)` wires pragmatic-drag-and-drop behavior for layer tree rows and maps drop instructions to editor reorder operations.
|
|
|
|
Use it when extending or replacing the default layer-tree drag UI.
|
|
|
|
## Related APIs
|
|
|
|
- [LayerTreeRoot](../components/layer-tree-root)
|
|
- [LayerTreeItem](../components/layer-tree-item)
|
|
- [useLayerTree](./use-layer-tree)
|