mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-21 13:28:12 +08:00
Drag to rearrange layers in the layer panel (#434)
* Add insert line * Implement dragging * Improve CSS and variable naming consistency * Resolved folder crash, added Undo/Redo support * Removed marker TODO leftover * JS cleanup * WIP preserving expanded state (via LayerData) when copy/pasting and moving layers in layer panel * Finish making folders copy/paste preserving expanded state, but not recursively yet * Add cut, copy, and paste to the Edit menu (#440) * Add cut * Hook up edit dropdown * Use copy message Co-authored-by: Keavon Chambers <keavon@keavon.com> Co-authored-by: otdavies <oliver@psyfer.io>
This commit is contained in:
committed by
Keavon Chambers
co-authored by
Keavon Chambers
otdavies
parent
451c9fcd46
commit
3de426b7cc
@@ -197,6 +197,8 @@ export enum MenuType {
|
||||
Dialog = "Dialog",
|
||||
}
|
||||
|
||||
const POINTER_STRAY_DISTANCE = 100;
|
||||
|
||||
export default defineComponent({
|
||||
components: {},
|
||||
props: {
|
||||
@@ -313,7 +315,6 @@ export default defineComponent({
|
||||
floatingMenuContent.style.minWidth = minWidth;
|
||||
},
|
||||
pointerMoveHandler(e: PointerEvent) {
|
||||
const POINTER_STRAY_DISTANCE = 100;
|
||||
const target = e.target as HTMLElement;
|
||||
const pointerOverFloatingMenuKeepOpen = target && (target.closest("[data-hover-menu-keep-open]") as HTMLElement);
|
||||
const pointerOverFloatingMenuSpawner = target && (target.closest("[data-hover-menu-spawner]") as HTMLElement);
|
||||
|
||||
Reference in New Issue
Block a user