Update Handle style
parent
3ac4493f4c
commit
d836164ea5
|
|
@ -1,12 +1,21 @@
|
||||||
import { Handle, Position } from "react-flow-renderer";
|
import { Handle, Position } from "react-flow-renderer";
|
||||||
import { bottomBigStyle, topBigStyle } from "../styles";
|
import {
|
||||||
|
bottomBigStyle,
|
||||||
|
bottomSmallStyle,
|
||||||
|
topBigStyle,
|
||||||
|
topDoubleRightStyle,
|
||||||
|
} from "../styles";
|
||||||
|
|
||||||
type LedNodeProps = {};
|
type LedNodeProps = {};
|
||||||
|
|
||||||
const LedNode = (props: LedNodeProps) => {
|
const LedNode = (props: LedNodeProps) => {
|
||||||
return (
|
return (
|
||||||
<div className="led-node node-layout">
|
<div className="led-node node-layout">
|
||||||
<Handle style={topBigStyle} type="target" position={Position.Top} />
|
<Handle
|
||||||
|
style={topDoubleRightStyle}
|
||||||
|
type="target"
|
||||||
|
position={Position.Top}
|
||||||
|
/>
|
||||||
|
|
||||||
<div className="node-header">
|
<div className="node-header">
|
||||||
<span className="node-title">Светодиод</span>
|
<span className="node-title">Светодиод</span>
|
||||||
|
|
@ -19,7 +28,11 @@ const LedNode = (props: LedNodeProps) => {
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<Handle style={bottomBigStyle} type="source" position={Position.Bottom} />
|
<Handle
|
||||||
|
style={bottomSmallStyle}
|
||||||
|
type="source"
|
||||||
|
position={Position.Bottom}
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,21 @@
|
||||||
import { Handle, Position } from "react-flow-renderer";
|
import { Handle, Position } from "react-flow-renderer";
|
||||||
import { bottomBigStyle, topBigStyle } from "../styles";
|
import {
|
||||||
|
bottomBigStyle,
|
||||||
|
bottomSmallStyle,
|
||||||
|
topBigStyle,
|
||||||
|
topDoubleRightStyle,
|
||||||
|
} from "../styles";
|
||||||
|
|
||||||
type SensorNodeProps = {};
|
type SensorNodeProps = {};
|
||||||
|
|
||||||
const SensorNode = (props: SensorNodeProps) => {
|
const SensorNode = (props: SensorNodeProps) => {
|
||||||
return (
|
return (
|
||||||
<div className="sensor-node node-layout">
|
<div className="sensor-node node-layout">
|
||||||
<Handle style={topBigStyle} type="target" position={Position.Top} />
|
<Handle
|
||||||
|
style={topDoubleRightStyle}
|
||||||
|
type="target"
|
||||||
|
position={Position.Top}
|
||||||
|
/>
|
||||||
<div className="node-header">
|
<div className="node-header">
|
||||||
<span className="node-title">Сенсор</span>
|
<span className="node-title">Сенсор</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -17,7 +26,11 @@ const SensorNode = (props: SensorNodeProps) => {
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<Handle style={bottomBigStyle} type="source" position={Position.Bottom} />
|
<Handle
|
||||||
|
style={bottomSmallStyle}
|
||||||
|
type="source"
|
||||||
|
position={Position.Bottom}
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,21 @@
|
||||||
import { Handle, Position } from "react-flow-renderer";
|
import { Handle, Position } from "react-flow-renderer";
|
||||||
import { bottomBigStyle, topBigStyle } from "../styles";
|
import {
|
||||||
|
bottomBigStyle,
|
||||||
|
bottomSmallStyle,
|
||||||
|
topBigStyle,
|
||||||
|
topDoubleRightStyle,
|
||||||
|
} from "../styles";
|
||||||
|
|
||||||
type DelayNodeProps = {};
|
type DelayNodeProps = {};
|
||||||
|
|
||||||
const DelayNode = (props: DelayNodeProps) => {
|
const DelayNode = (props: DelayNodeProps) => {
|
||||||
return (
|
return (
|
||||||
<div className="delay-node node-layout">
|
<div className="delay-node node-layout">
|
||||||
<Handle style={topBigStyle} type="target" position={Position.Top} />
|
<Handle
|
||||||
|
style={topDoubleRightStyle}
|
||||||
|
type="target"
|
||||||
|
position={Position.Top}
|
||||||
|
/>
|
||||||
<div className="node-header">
|
<div className="node-header">
|
||||||
<span className="node-title">Задержка</span>
|
<span className="node-title">Задержка</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -17,7 +26,11 @@ const DelayNode = (props: DelayNodeProps) => {
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<Handle style={bottomBigStyle} type="source" position={Position.Bottom} />
|
<Handle
|
||||||
|
style={bottomSmallStyle}
|
||||||
|
type="source"
|
||||||
|
position={Position.Bottom}
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
import { Handle, Position } from "react-flow-renderer";
|
import { Handle, Position } from "react-flow-renderer";
|
||||||
import {
|
import {
|
||||||
bottomBigStyle,
|
bottomBigStyle,
|
||||||
|
bottomSmallStyle,
|
||||||
topDoubleLeftStyle,
|
topDoubleLeftStyle,
|
||||||
topDoubleRightStyle,
|
topDoubleRightStyle,
|
||||||
} from "../styles";
|
} from "../styles";
|
||||||
|
|
@ -38,7 +39,11 @@ const MathNode = (props: MathNodeProps) => {
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<Handle style={bottomBigStyle} type="source" position={Position.Bottom} />
|
<Handle
|
||||||
|
style={bottomSmallStyle}
|
||||||
|
type="source"
|
||||||
|
position={Position.Bottom}
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,24 +1,24 @@
|
||||||
const topDoubleLeftStyle = {
|
const topDoubleLeftStyle = {
|
||||||
width: "20px",
|
width: "20px",
|
||||||
height: "20px",
|
height: "15px",
|
||||||
border: "none",
|
border: "none",
|
||||||
borderTopLeftRadius: "10px",
|
borderTopLeftRadius: "10px",
|
||||||
borderTopRightRadius: "10px",
|
borderTopRightRadius: "10px",
|
||||||
borderBottomLeftRadius: "0px",
|
borderBottomLeftRadius: "0px",
|
||||||
borderBottomRightRadius: "0px",
|
borderBottomRightRadius: "0px",
|
||||||
top: "-20px",
|
top: "-15px",
|
||||||
left: "20px",
|
left: "20px",
|
||||||
};
|
};
|
||||||
|
|
||||||
const topDoubleRightStyle = {
|
const topDoubleRightStyle = {
|
||||||
width: "20px",
|
width: "20px",
|
||||||
height: "20px",
|
height: "15px",
|
||||||
border: "none",
|
border: "none",
|
||||||
borderTopLeftRadius: "10px",
|
borderTopLeftRadius: "10px",
|
||||||
borderTopRightRadius: "10px",
|
borderTopRightRadius: "10px",
|
||||||
borderBottomLeftRadius: "0px",
|
borderBottomLeftRadius: "0px",
|
||||||
borderBottomRightRadius: "0px",
|
borderBottomRightRadius: "0px",
|
||||||
top: "-20px",
|
top: "-15px",
|
||||||
};
|
};
|
||||||
|
|
||||||
const topBigStyle = {
|
const topBigStyle = {
|
||||||
|
|
@ -43,4 +43,32 @@ const bottomBigStyle = {
|
||||||
bottom: "-10px",
|
bottom: "-10px",
|
||||||
};
|
};
|
||||||
|
|
||||||
export { topBigStyle, bottomBigStyle, topDoubleLeftStyle, topDoubleRightStyle };
|
const topSmallStyle = {
|
||||||
|
width: "20px",
|
||||||
|
height: "15px",
|
||||||
|
border: "none",
|
||||||
|
borderTopLeftRadius: "10px",
|
||||||
|
borderTopRightRadius: "10px",
|
||||||
|
borderBottomLeftRadius: "0px",
|
||||||
|
borderBottomRightRadius: "0px",
|
||||||
|
top: "-15px",
|
||||||
|
};
|
||||||
|
|
||||||
|
const bottomSmallStyle = {
|
||||||
|
width: "20px",
|
||||||
|
height: "15px",
|
||||||
|
border: "none",
|
||||||
|
borderTopLeftRadius: "0px",
|
||||||
|
borderTopRightRadius: "0px",
|
||||||
|
borderBottomLeftRadius: "10px",
|
||||||
|
borderBottomRightRadius: "10px",
|
||||||
|
bottom: "-15px",
|
||||||
|
};
|
||||||
|
|
||||||
|
export {
|
||||||
|
topBigStyle,
|
||||||
|
bottomBigStyle,
|
||||||
|
topDoubleLeftStyle,
|
||||||
|
topDoubleRightStyle,
|
||||||
|
bottomSmallStyle,
|
||||||
|
};
|
||||||
|
|
|
||||||
|
|
@ -63,6 +63,7 @@
|
||||||
|
|
||||||
.node-layout {
|
.node-layout {
|
||||||
@apply flex flex-col items-center
|
@apply flex flex-col items-center
|
||||||
|
rounded-lg
|
||||||
w-[150px] h-fit bg-bluePrimary
|
w-[150px] h-fit bg-bluePrimary
|
||||||
p-[4px];
|
p-[4px];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue