Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gojs-project
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
jlc
gojs-project
Commits
ac1a3ef4
Commit
ac1a3ef4
authored
Jun 26, 2024
by
jlc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update:编辑模式和预览模式的切换
parent
c26a011f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
8 deletions
+6
-8
imageNode.vue
src/stageAchievements/imageNode.vue
+6
-8
No files found.
src/stageAchievements/imageNode.vue
View file @
ac1a3ef4
...
...
@@ -73,7 +73,6 @@ function initDiagram() {
"draggingTool.guidelineWidth"
:
1
,
// 设置辅助对齐的线条的粗细
// 旋转节点
rotatingTool
:
new
RotateMultipleTool
(),
"relinkingTool.isUnconnectedLinkValid"
:
false
,
});
myDiagram
.
toolManager
.
mouseMoveTools
.
insertAt
(
0
,
new
PortShiftingTool
());
// 设置端口移动
...
...
@@ -113,7 +112,6 @@ function initDiagram() {
),
},
new
go
.
Binding
(
'portId'
,
'portId'
),
new
go
.
Binding
(
'visible'
,
'visible'
),
new
go
.
Binding
(
'alignment'
,
'portKey'
,
(
portKey
:
string
)
=>
{
switch
(
portKey
)
{
case
"top"
:
return
go
.
Spot
.
Top
;
...
...
@@ -146,6 +144,7 @@ function initDiagram() {
strokeWidth
:
1
,
desiredSize
:
new
go
.
Size
(
6
,
6
),
},
new
go
.
Binding
(
'visible'
,
'visible'
),
)
),
},
...
...
@@ -270,7 +269,6 @@ function initDiagram() {
),
},
new
go
.
Binding
(
'portId'
,
'portId'
),
new
go
.
Binding
(
'visible'
,
'visible'
),
new
go
.
Binding
(
'alignment'
,
'portKey'
,
(
portKey
:
string
)
=>
{
switch
(
portKey
)
{
case
"top"
:
return
go
.
Spot
.
Top
;
...
...
@@ -303,6 +301,7 @@ function initDiagram() {
strokeWidth
:
1
,
desiredSize
:
new
go
.
Size
(
6
,
6
),
},
new
go
.
Binding
(
'visible'
,
'visible'
),
)
),
},
...
...
@@ -396,13 +395,12 @@ function initDiagram() {
myDiagram
.
linkTemplate
=
$
(
go
.
Link
,
{
routing
:
go
.
Routing
.
AvoidsNodes
,
routing
:
go
.
Routing
.
Orthogonal
,
curve
:
go
.
Curve
.
JumpGap
,
corner
:
5
,
corner
:
10
,
adjusting
:
go
.
LinkAdjusting
.
Stretch
,
reshapable
:
fals
e
// 设置连接线的形态是否可以被修改
reshapable
:
tru
e
// 设置连接线的形态是否可以被修改
},
new
go
.
Binding
(
"points"
).
makeTwoWay
(),
$
(
go
.
Shape
,
// 链接线的样式
{
strokeWidth
:
1.5
...
...
@@ -519,7 +517,7 @@ function initDiagram() {
{
key
:
"add2"
,
color
:
"lightblue"
,
loc
:
new
go
.
Point
(
100
,
50
),
category
:
"zhaChi"
,
portArray
:
[{
portId
:
"bottom0"
,
portKey
:
"bottom"
}],
markArray
:
[{
markId
:
"mark0"
}]
},
];
const
linkDataArray
=
[
{
from
:
"add1"
,
fromPort
:
"top0"
,
to
:
"add2"
,
toPort
:
"bottom0"
,
text
:
"1->2"
,
"points"
:[
-
96.5
,
200
,
-
96.5
,
190
,
-
96.5
,
166.4
,
191.45
,
166.4
,
191.45
,
142.8
,
191.45
,
132.8
]
},
{
from
:
"add1"
,
fromPort
:
"top0"
,
to
:
"add2"
,
toPort
:
"bottom0"
,
text
:
"1->2"
},
];
myDiagram
.
model
=
...
...
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