File tree Expand file tree Collapse file tree 8 files changed +13
-12
lines changed
admin-ui/src/components/Flow/nodes Expand file tree Collapse file tree 8 files changed +13
-12
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,6 @@ $color: #61aa1f;
44.circulate-node {
55 display : flex ;
66 align-items : center ;
7- min-width : 200px ;
87 max-height : 40px ;
98 border : 1px solid $color ;
109 border-radius : 12px ;
Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ export const CirculateView: React.FC<CirculateProps> = (props) => {
4545 < div >
4646 < span className = { "code" } >
4747 { props . code && (
48- < > ({ props . code } )</ >
48+ < > ({ props . code } )</ >
4949 ) }
5050 </ span >
5151 < span className = { "title" } > { props . name } </ span >
@@ -81,7 +81,8 @@ export const CirculateView: React.FC<CirculateProps> = (props) => {
8181
8282class CirculateModel extends HtmlNodeModel {
8383 setAttributes ( ) {
84- this . width = 250 ;
84+ const name = this . properties . name as string ;
85+ this . width = 200 + name . length * 10 ;
8586 this . height = 45 ;
8687 this . text . editable = false ;
8788 this . menu = [ ] ;
Original file line number Diff line number Diff line change @@ -4,7 +4,6 @@ $color: #6855ef;
44.node-node {
55 display : flex ;
66 align-items : center ;
7- min-width : 200px ;
87 max-height : 40px ;
98 border : 1px solid $color ;
109 border-radius : 12px ;
Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ export const NodeView: React.FC<NodeProps> = (props) => {
4646 < div >
4747 < span className = { "code" } >
4848 { props . code && (
49- < > ({ props . code } )</ >
49+ < > ({ props . code } )</ >
5050 ) }
5151 </ span >
5252 < span className = { "title" } > { props . name } </ span >
@@ -82,7 +82,8 @@ export const NodeView: React.FC<NodeProps> = (props) => {
8282
8383class NodeModel extends HtmlNodeModel {
8484 setAttributes ( ) {
85- this . width = 250 ;
85+ const name = this . properties . name as string ;
86+ this . width = 200 + name . length * 10 ;
8687 this . height = 45 ;
8788 this . text . editable = false ;
8889 this . menu = [ ] ;
Original file line number Diff line number Diff line change @@ -4,7 +4,6 @@ $color: #ea3f21;
44.over-node {
55 display : flex ;
66 align-items : center ;
7- min-width : 200px ;
87 max-height : 40px ;
98 border : 1px solid $color ;
109 border-radius : 12px ;
Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ export const OverView: React.FC<OverProps> = (props) => {
4646 < div >
4747 < span className = { "code" } >
4848 { props . code && (
49- < > ({ props . code } )</ >
49+ < > ({ props . code } )</ >
5050 ) }
5151 </ span >
5252 < span className = { "title" } > { props . name } </ span >
@@ -80,8 +80,10 @@ export const OverView: React.FC<OverProps> = (props) => {
8080}
8181
8282class OverModel extends HtmlNodeModel {
83+
8384 setAttributes ( ) {
84- this . width = 250 ;
85+ const name = this . properties . name as string ;
86+ this . width = 200 + name . length * 10 ;
8587 this . height = 45 ;
8688 this . text . editable = false ;
8789 this . menu = [ ] ;
Original file line number Diff line number Diff line change @@ -3,7 +3,6 @@ $color: #b1ad30;
33.start-node {
44 display : flex ;
55 align-items : center ;
6- min-width : 200px ;
76 max-height : 40px ;
87 border : 1px solid $color ;
98 border-radius : 12px ;
Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ export const StartView: React.FC<StartProps> = (props) => {
4545 < div >
4646 < span className = { "code" } >
4747 { props . code && (
48- < > ({ props . code } )</ >
48+ < > ({ props . code } )</ >
4949 ) }
5050 </ span >
5151 < span className = { "title" } > { props . name } </ span >
@@ -80,7 +80,8 @@ export const StartView: React.FC<StartProps> = (props) => {
8080
8181class StartModel extends HtmlNodeModel {
8282 setAttributes ( ) {
83- this . width = 250 ;
83+ const name = this . properties . name as string ;
84+ this . width = 200 + name . length * 10 ;
8485 this . height = 45 ;
8586 this . text . editable = false ;
8687 this . menu = [ ] ;
You can’t perform that action at this time.
0 commit comments