ms-advance-chart
Version:
Making diagrams or flows is easy using ms-advance-chart
192 lines (159 loc) • 3.02 kB
CSS
.custom-node {
position: absolute;
width: 100px;
padding: 10px;
background: white;
border: 1px solid #ccc;
border-radius: 4px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
overflow: visible;
}
.node-header {
display: flex;
justify-content: space-between;
align-items: center;
}
.node-title {
font-size: 14px;
font-weight: bold;
}
.delete-icon {
cursor: pointer;
color: red;
}
.node-body {
margin-top: 10px;
position: relative;
}
.handle {
width: 8px;
height: 8px;
background: blue;
border-radius: 50%;
cursor: pointer;
position: absolute;
display: none;
z-index: 1;
}
.custom-node:hover .handle {
display: block;
}
.decision-node {
position: absolute;
width: 100px;
padding: 10px;
background: #f9f9f9;
border: 2px solid #333;
border-radius: 4px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
overflow: visible;
}
.node-header {
display: flex;
justify-content: space-between;
align-items: center;
}
.node-title {
font-size: 14px;
font-weight: bold;
}
.delete-icon {
cursor: pointer;
color: red;
}
.node-body {
margin-top: 10px;
position: relative;
}
.decision-node:hover .handle {
display: block;
}
.source-handle.yes {
top: -4px;
left: 25%;
transform: translateX(-50%);
}
.source-handle.no {
top: -4px;
right: 25%;
transform: translateX(50%);
}
.target-handle {
bottom: -4px;
left: 50%;
transform: translateX(-50%);
}
.decision-options {
display: flex;
justify-content: space-between;
margin-top: 5px;
}
.decision-option {
background: #e3e3e3;
padding: 2px 5px;
border-radius: 3px;
}
.sidebar {
width: 200px;
background: #f4f4f4;
padding: 10px;
}
.sidebar-node {
margin: 10px 0;
padding: 10px;
background: #ddd;
cursor: grab;
}
.canvas {
flex: 1;
position: relative;
background: #f9f9f9;
border: 1px solid #ccc;
overflow: hidden;
}
.app {
display: flex;
height: 100vh;
}
.handle {
width: 7px;
height: 7px;
background: rgb(145 144 144);
border-radius: 50%;
cursor: pointer;
position: absolute;
display: none;
z-index: 1;
}
.source-handle {
background: rgb(155, 155, 155);
}
.target-handle {
background: rgb(179, 179, 179);
}
.source-handle.top,
.target-handle.top {
top: -4px;
left: 50%;
transform: translateX(-50%);
}
.source-handle.bottom,
.target-handle.bottom {
bottom: -4px;
left: 50%;
transform: translateX(-50%);
}
.source-handle.right,
.target-handle.right {
position: absolute;
right: -4px;
top: 50%;
transform: translateY(-50%);
}
.source-handle.left,
.target-handle.left {
position: absolute;
left: -4px;
top: 50%;
transform: translateY(-50%);
}