Skip to content

Commit 41fb72e

Browse files
committed
fix code style
1 parent a70da9a commit 41fb72e

File tree

8 files changed

+13
-12
lines changed

8 files changed

+13
-12
lines changed

admin-ui/src/components/Flow/nodes/Circulate/index.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff 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;

admin-ui/src/components/Flow/nodes/Circulate/index.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff 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

8282
class 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 = [];

admin-ui/src/components/Flow/nodes/Node/index.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff 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;

admin-ui/src/components/Flow/nodes/Node/index.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff 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

8383
class 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 = [];

admin-ui/src/components/Flow/nodes/Over/index.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff 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;

admin-ui/src/components/Flow/nodes/Over/index.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff 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

8282
class 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 = [];

admin-ui/src/components/Flow/nodes/Start/index.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff 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;

admin-ui/src/components/Flow/nodes/Start/index.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff 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

8181
class 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 = [];

0 commit comments

Comments
 (0)