mirror of
https://github.com/outline/outline.git
synced 2026-11-20 21:23:06 +03:00
* wip: Dragging of table rows and columns * wip * grabbing cursor * refactor * Update shared/editor/plugins/TableDragDropPlugin.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update shared/editor/plugins/TableDragDropPlugin.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
24 lines
603 B
TypeScript
24 lines
603 B
TypeScript
import { PluginKey } from "prosemirror-state";
|
|
|
|
/** State for tracking row drag operations. */
|
|
export interface RowDragState {
|
|
isDragging: boolean;
|
|
fromIndex: number;
|
|
toIndex: number;
|
|
}
|
|
|
|
/** State for tracking column drag operations. */
|
|
export interface ColumnDragState {
|
|
isDragging: boolean;
|
|
fromIndex: number;
|
|
toIndex: number;
|
|
}
|
|
|
|
/** Plugin key for accessing row drag state. */
|
|
export const rowDragPluginKey = new PluginKey<RowDragState>("row-drag");
|
|
|
|
/** Plugin key for accessing column drag state. */
|
|
export const columnDragPluginKey = new PluginKey<ColumnDragState>(
|
|
"column-drag"
|
|
);
|