chore(core): cleanup types
Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
@@ -172,7 +172,7 @@ export interface EdgeProps<Data = ElementData, CustomEvents = {}, Type extends s
|
||||
type: Type
|
||||
label?: string | VNode | Component<EdgeTextProps> | Object
|
||||
style?: CSSProperties
|
||||
selected: boolean
|
||||
selected?: boolean
|
||||
sourcePosition: Position
|
||||
targetPosition: Position
|
||||
sourceHandleId?: string
|
||||
|
||||
@@ -238,7 +238,7 @@ export interface Actions extends ViewportFunctions {
|
||||
/** apply translate extent to d3 */
|
||||
setTranslateExtent: (translateExtent: CoordinateExtent) => void
|
||||
/** apply extent to nodes */
|
||||
setNodeExtent: (nodeExtent: CoordinateExtent) => void
|
||||
setNodeExtent: (nodeExtent: CoordinateExtent | CoordinateExtentRange) => void
|
||||
/** enable/disable node interaction (dragging, selecting etc) */
|
||||
setInteractive: (isInteractive: boolean) => void
|
||||
/** set new state */
|
||||
|
||||
@@ -103,7 +103,7 @@ function getParentExtent(
|
||||
export function getExtent<T extends NodeDragItem | GraphNode>(
|
||||
item: T,
|
||||
onError: State['hooks']['error']['trigger'],
|
||||
extent?: CoordinateExtent,
|
||||
extent?: State['nodeExtent'],
|
||||
parent?: GraphNode,
|
||||
) {
|
||||
let currentExtent = item.extent || extent
|
||||
@@ -146,7 +146,7 @@ export function calcNextPosition(
|
||||
node: GraphNode | NodeDragItem,
|
||||
nextPosition: XYPosition,
|
||||
onError: State['hooks']['error']['trigger'],
|
||||
nodeExtent?: CoordinateExtent,
|
||||
nodeExtent?: State['nodeExtent'],
|
||||
parentNode?: GraphNode,
|
||||
) {
|
||||
const extent = getExtent(node, onError, nodeExtent, parentNode)
|
||||
|
||||
Reference in New Issue
Block a user