Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
V
vue-gojs
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
吴斌
vue-gojs
Commits
72b45730
Commit
72b45730
authored
Nov 21, 2023
by
吴斌
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update: 端口移动以1px的距离跳跃,而非连续。
fix:端口间连线对不齐的问题。
parent
67d0df75
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletions
+5
-1
PortShiftingTool.ts
src/kit/extensions/PortShiftingTool.ts
+5
-1
No files found.
src/kit/extensions/PortShiftingTool.ts
View file @
72b45730
...
...
@@ -148,6 +148,10 @@ export class PortShiftingTool extends go.Tool {
const
br
=
main
.
getDocumentPoint
(
go
.
Spot
.
BottomRight
);
const
x
=
Math
.
max
(
0
,
Math
.
min
((
last
.
x
-
tl
.
x
)
/
(
br
.
x
-
tl
.
x
),
1
));
const
y
=
Math
.
max
(
0
,
Math
.
min
((
last
.
y
-
tl
.
y
)
/
(
br
.
y
-
tl
.
y
),
1
));
this
.
port
.
alignment
=
new
go
.
Spot
(
x
,
y
);
const
parent_x
=
br
.
x
-
tl
.
x
const
parent_y
=
br
.
y
-
tl
.
y
const
dx
=
Math
.
round
(
parent_x
*
x
)
const
dy
=
Math
.
round
(
parent_y
*
y
)
this
.
port
.
alignment
=
new
go
.
Spot
(
dx
/
parent_x
,
dy
/
parent_y
);
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment