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
85ac5828
Commit
85ac5828
authored
Oct 08, 2023
by
吴斌
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update:连线样式修改
parent
1f4339e1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
3 deletions
+33
-3
App.vue
src/App.vue
+0
-0
LinkTemplateKit.ts
src/kit/LinkTemplateKit.ts
+33
-3
No files found.
src/App.vue
View file @
85ac5828
This diff is collapsed.
Click to expand it.
src/kit/LinkTemplateKit.ts
View file @
85ac5828
import
{
GO
}
from
'./GOJSKit'
import
{
GO
}
from
'./GOJSKit'
import
go
from
'gojs'
import
go
from
'gojs'
import
{
log
}
from
"util"
;
export
var
linkSelectionAdornmentTemplate
=
export
var
linkSelectionAdornmentTemplate
=
GO
(
go
.
Adornment
,
"Link"
,
GO
(
go
.
Adornment
,
"Link"
,
GO
(
go
.
Shape
,
GO
(
go
.
Shape
,
// isPanelMain declares that this Shape shares the Link.geometry
// isPanelMain declares that this Shape shares the Link.geometry
{
isPanelMain
:
true
,
fill
:
null
,
stroke
:
"deepskyblue"
,
strokeWidth
:
1
},
{
isPanelMain
:
true
,
fill
:
null
,
stroke
:
"deepskyblue"
,
strokeWidth
:
1
},
new
go
.
Binding
(
"stroke"
).
makeTwoWay
()
)
// use selection object's strokeWidth
)
// use selection object's strokeWidth
);
);
export
function
MultiArrowLink
()
{
export
function
MultiArrowLink
()
{
go
.
Link
.
call
(
this
);
go
.
Link
.
call
(
this
);
// return GO(go.Link, {stroke:"red"})
}
}
go
.
Diagram
.
inherit
(
MultiArrowLink
,
go
.
Link
);
go
.
Diagram
.
inherit
(
MultiArrowLink
,
go
.
Link
);
MultiArrowLink
.
prototype
.
makeGeometry
=
function
()
{
MultiArrowLink
.
prototype
.
makeGeometry
=
function
()
{
...
@@ -54,4 +55,33 @@ MultiArrowLink.prototype.makeGeometry = function() {
...
@@ -54,4 +55,33 @@ MultiArrowLink.prototype.makeGeometry = function() {
fy
=
ay
;
fy
=
ay
;
}
}
return
geo
;
return
geo
;
};
};
\ No newline at end of file
export
var
FlowLink
=
GO
(
go
.
Link
,{
routing
:
go
.
Link
.
AvoidsNodes
,
curve
:
go
.
Link
.
JumpGap
,
corner
:
5
,
toShortLength
:
4
,
relinkableFrom
:
true
,
relinkableTo
:
true
,
reshapable
:
true
,
// resegmentable: true,
},
new
go
.
Binding
(
"points"
,
"points"
).
makeTwoWay
(),
GO
(
go
.
Shape
,
{
isPanelMain
:
true
,
strokeWidth
:
5
,
stroke
:
'red'
}),
GO
(
go
.
Shape
,
{
isPanelMain
:
true
,
strokeWidth
:
5
,
stroke
:
'green'
,
name
:
"FLOW"
,
strokeDashArray
:
[
10
,
10
]}),
GO
(
go
.
Shape
,
{
toArrow
:
"Standard"
,
stroke
:
null
})
);
export
function
animateFlow
(
myDiagram
:
go
.
Diagram
){
// if (myAnimation) myAnimation.stop();
// Animate the flow in the pipes
let
myAnimation
=
new
go
.
Animation
();
myAnimation
.
easing
=
go
.
Animation
.
EaseLinear
;
myDiagram
.
links
.
each
(
link
=>
link
.
findObject
(
"FLOW"
)?
myAnimation
.
add
(
link
.
findObject
(
"FLOW"
),
"strokeDashOffset"
,
20
,
0
):
null
);
myDiagram
.
links
.
each
(
link
=>
console
.
log
(
link
))
// Run indefinitely
myAnimation
.
runCount
=
Infinity
;
myAnimation
.
start
();
}
\ No newline at end of file
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