Refactor: Better routing for smoothstep and step edge (#2407)
* refactor(step/smoothstep-edge): better default routing * chore(edges): pass options * chore(exports): add BaseEdge
This commit is contained in:
@@ -182,6 +182,7 @@ const EdgeRenderer = (props: EdgeRendererProps) => {
|
||||
rfId={props.rfId}
|
||||
ariaLabel={edge.ariaLabel}
|
||||
disableKeyboardA11y={props.disableKeyboardA11y}
|
||||
options={'options' in edge ? edge.options : undefined}
|
||||
/>
|
||||
);
|
||||
})}
|
||||
|
||||
@@ -127,7 +127,6 @@ const NodeRenderer = (props: NodeRendererProps) => {
|
||||
zIndex={node[internalsSymbol]?.z ?? 0}
|
||||
isParent={!!node[internalsSymbol]?.isParent}
|
||||
noDragClassName={props.noDragClassName}
|
||||
noPanClassName={props.noPanClassName}
|
||||
initialized={!!node.width && !!node.height}
|
||||
rfId={props.rfId}
|
||||
disableKeyboardA11y={props.disableKeyboardA11y}
|
||||
|
||||
@@ -28,14 +28,3 @@ export function useNodeOrEdgeTypes(nodeOrEdgeTypes: any, createTypes: any): any
|
||||
|
||||
return typesParsed;
|
||||
}
|
||||
|
||||
export function injectStyle(css: string): void {
|
||||
if (!css || typeof document === 'undefined') return;
|
||||
|
||||
const head = document.head || document.getElementsByTagName('head')[0];
|
||||
const style = document.createElement('style');
|
||||
|
||||
head.appendChild(style);
|
||||
|
||||
style.appendChild(document.createTextNode(css));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user