better support for repeats

This commit is contained in:
ari committed 2022-07-15 11:07:02 -04:00
1 parent 9dd23fd8e7
commit bbe6a5abf3
11 files changed
+223 -142

No files matched your search

@@ -16,7 +16,11 @@ export const ButtonNode: FC<ButtonNodeProps> = ({
}) => {
const inner = (
<>
<Handle type="target" position={flipped ? Position.Top : Position.Left} />
<Handle
id="default"
type="target"
position={flipped ? Position.Top : Position.Left}
/>
{icon}
<Handle
id="default"
@@ -3,20 +3,24 @@ import { Handle, Position } from "react-flow-renderer";
import { SequenceNodeProps } from "./types";
import { SequenceNodeElement } from "./SequenceNodeElement";
export const SequenceNode: FC<SequenceNodeProps> = ({
hasInput = false,
...props
}) => {
export const SequenceNode: FC<SequenceNodeProps> = (props) => {
return (
<SequenceNodeElement {...props}>
{hasInput && (
<>
<Handle
type="target"
position={props.flipped ? Position.Top : Position.Left}
/>
</>
)}
<>
<Handle
id="default"
key="target-default"
type="target"
position={props.flipped ? Position.Top : Position.Left}
/>
<Handle
id="return"
key="target-return"
type="target"
position={props.flipped ? Position.Right : Position.Bottom}
/>
</>
<Handle
type="source"
position={props.flipped ? Position.Bottom : Position.Right}
@@ -28,9 +28,7 @@ export type SequenceNodeElementProps = SequenceNodeBaseProps & {
width: number;
flipped: boolean;
};
export type SequenceNodeDataProps = SequenceNodeBaseProps & {
hasInput?: boolean;
};
export type SequenceNodeDataProps = SequenceNodeBaseProps & {};
export interface SequenceNodeProps extends SequenceNodeDataProps {
height: number;
width: number;