2025-02-10 01:32:55 +03:00
|
|
|
/**
|
|
|
|
* Module: OSS representation.
|
|
|
|
*/
|
2025-02-21 21:15:05 +03:00
|
|
|
import { type Node } from 'reactflow';
|
2025-02-10 01:32:55 +03:00
|
|
|
|
2025-02-21 21:15:05 +03:00
|
|
|
import { type IOperation } from './oss';
|
2025-02-18 23:39:11 +03:00
|
|
|
|
2025-02-10 01:32:55 +03:00
|
|
|
/**
|
|
|
|
* Represents XY Position.
|
|
|
|
*/
|
|
|
|
export interface Position2D {
|
|
|
|
x: number;
|
|
|
|
y: number;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Represents graph OSS node data.
|
|
|
|
*/
|
|
|
|
export interface OssNode extends Node {
|
|
|
|
id: string;
|
|
|
|
data: {
|
|
|
|
label: string;
|
|
|
|
operation: IOperation;
|
|
|
|
};
|
|
|
|
position: { x: number; y: number };
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Represents graph OSS node internal data.
|
|
|
|
*/
|
|
|
|
export interface OssNodeInternal {
|
|
|
|
id: string;
|
|
|
|
data: {
|
|
|
|
label: string;
|
|
|
|
operation: IOperation;
|
|
|
|
};
|
|
|
|
dragging: boolean;
|
|
|
|
xPos: number;
|
|
|
|
yPos: number;
|
|
|
|
}
|