Closed sklaffke closed 10 months ago
uhmm...
Try:
.drawflow-node {
background:red;
}
Doesn't work - I use bootstrap 5 for the page, if I use as DisplayType "block" and for the inputs and outputs the following css: .drawflow .drawflow-node .input, .drawflow .drawflow-node .output {
position: absolute;
width: 20px;
height: 20px;
border-radius: 50%;
//margin-top: 50px;
cursor: crosshair;
z-index: 1;
margin-bottom: 5px;
}
the result looks quite ok, but I want to get the inputs and outputs in the middle
In addition, if use this approach my condition node which has two outputs is not displayed properly
Finally, I got it to run: I have changed the css for the inputs and outputs and added a second css for output_2. Now I am nearly happy with the result: The css looks like this: .drawflow .drawflow-node .input, .drawflow .drawflow-node .output {
position: absolute;
width: 20px;
height: 20px;
border-radius: 50%;
//top: 50px;
cursor: crosshair;
z-index: 1;
margin-bottom: 5px;
}
.drawflow .drawflow-node .input { left: -12px; top: 50%; background: var(--dfInputBackgroundColor); border: var(--dfInputBorderSize) solid var(--dfInputBorderColor); } .drawflow .drawflow-node .output { right: -10px; top: 50%; background: var(--dfOutputBackgroundColor); border: var(--dfOutputBorderSize) solid var(--dfOutputBorderColor); }
.drawflow .drawflow-node .output_2 { right: -10px; margin-top: 5px; top: 70%; background: var(--dfOutputBackgroundColor); border: var(--dfOutputBorderSize) solid var(--dfOutputBorderColor); }
Hi, the library works very well in my Angular app - thank you very much for this awesome library. However I have an issue with the styling. I would like to fill the nodes entirely with the corresponding background color of the specific node type. However I have a padding left and right for the inputs and outputs which are filled with white. As you can see in my screenshot the title-box is also not filled entirely. What param do I need to change in the css? Please find below the CSS which works with my Angular app: :root { --dfBackgroundColor: #ffffff; --dfBackgroundSize: 25px; --dfBackgroundImage: linear-gradient( to right, rgba(233, 233, 233, 1) 1px, transparent 1px ), linear-gradient(to bottom, rgba(233, 233, 233, 1) 1px, transparent 1px);
}
/ Editing Drawflow / .parent-drawflow { display: flex; overflow: hidden; touch-action: none; outline:none; }
drawflow {
}
.drawflow .parent-node { position: relative;
}
.drawflow .drawflow-node { align-items: center; text-align: start; position: absolute; z-index: 2; display: var(--dfNodeType); background: var(--dfNodeBackgroundColor); color: var(--dfNodeTextColor); border: var(--dfNodeBorderSize) solid var(--dfNodeBorderColor); border-radius: var(--dfNodeBorderRadius); min-height: var(--dfNodeMinHeight); width: auto; min-width: var(--dfNodeMinWidth); padding-top: var(--dfNodePaddingTop); padding-bottom: var(--dfNodePaddingBottom); -webkit-box-shadow: var(--dfNodeBoxShadowHL) var(--dfNodeBoxShadowVL) var(--dfNodeBoxShadowBR) var(--dfNodeBoxShadowS) var(--dfNodeBoxShadowColor); box-shadow: var(--dfNodeBoxShadowHL) var(--dfNodeBoxShadowVL) var(--dfNodeBoxShadowBR) var(--dfNodeBoxShadowS) var(--dfNodeBoxShadowColor); }