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
42c6c754
Commit
42c6c754
authored
Jul 01, 2024
by
jlc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update:细节修改
parent
24f53b99
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
6 deletions
+16
-6
imageNode.vue
src/stageAchievements/imageNode.vue
+16
-6
No files found.
src/stageAchievements/imageNode.vue
View file @
42c6c754
...
...
@@ -173,7 +173,8 @@ function toggleDivs(value: boolean) {
function
initDiagram
()
{
myDiagram
=
$
(
go
.
Diagram
,
"diagramDiv"
,
{
"undoManager.isEnabled"
:
true
,
// 'grid.visible': true, // 画布上面是否出现网格
'grid.visible'
:
true
,
// 画布上面是否出现网格
"grid.gridCellSize"
:
new
go
.
Size
(
5
,
5
),
// 设置背景网格的大小
"toolManager.mouseWheelBehavior"
:
go
.
WheelMode
.
Zoom
,
// contentAlignment: go.Spot.Center, // 元素位置移动后始终处于在画布正中间
resizingTool
:
new
ResizeMultipleTool
(),
// 自定义ResizeMultipleTool()方法来设置元素大小的缩放
...
...
@@ -351,7 +352,8 @@ function initDiagram() {
segmentIndex
:
NaN
,
segmentFraction
:
0.5
,
visible
:
true
,
_isLinkLabel
:
true
_isLinkLabel
:
true
,
layerName
:
'Foreground'
},
new
go
.
Binding
(
"location"
,
"loc"
),
new
go
.
Binding
(
"desiredSize"
,
"size"
,
go
.
Size
.
parse
).
makeTwoWay
(
go
.
Size
.
stringify
),
...
...
@@ -473,7 +475,9 @@ function initDiagram() {
$
(
go
.
TextBlock
,
{
stroke
:
'black'
,
margin
:
4
margin
:
4
,
width
:
40
,
textAlign
:
"center"
},
new
go
.
Binding
(
'text'
,
'name'
)
),
...
...
@@ -482,7 +486,9 @@ function initDiagram() {
{
stroke
:
'black'
,
column
:
1
,
margin
:
4
margin
:
4
,
width
:
40
,
textAlign
:
"center"
},
new
go
.
Binding
(
'text'
,
'value'
)
),
...
...
@@ -492,6 +498,8 @@ function initDiagram() {
stroke
:
'black'
,
column
:
2
,
margin
:
4
,
width
:
40
,
textAlign
:
"center"
},
new
go
.
Binding
(
'text'
,
'unit'
)
),
...
...
@@ -538,7 +546,7 @@ function initDiagram() {
$
(
go
.
TextBlock
,
{
stroke
:
'black'
,
margin
:
4
margin
:
4
,
},
new
go
.
Binding
(
'text'
,
'damageName'
)
),
...
...
@@ -547,7 +555,7 @@ function initDiagram() {
{
stroke
:
'black'
,
column
:
1
,
margin
:
4
margin
:
4
,
},
new
go
.
Binding
(
'text'
,
'damageValue'
)
),
...
...
@@ -701,6 +709,8 @@ function initDiagram() {
}
});
// myDiagram.commit((d: any) => d.remove("add1"), "Remove Part");
const
nodeDataArray
=
[
{
key
:
"add1"
,
color
:
"lightyellow"
,
loc
:
new
go
.
Point
(
-
150
,
200
),
portArray
:
[{
portId
:
"top0"
,
portKey
:
"top"
},
{
portId
:
"left0"
,
portKey
:
"left"
},
{
portId
:
"right0"
,
portKey
:
"right"
},
{
portId
:
"bottom0"
,
portKey
:
"bottom"
}],
markArray
:
[]
},
{
key
:
"add2"
,
color
:
"lightblue"
,
loc
:
new
go
.
Point
(
100
,
50
),
category
:
"zhaChi"
,
portArray
:
[{
portId
:
"bottom0"
,
portKey
:
"bottom"
}],
markArray
:
[]
},
...
...
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