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
8a9f9148
Commit
8a9f9148
authored
Oct 18, 2023
by
吴斌
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update:修复打包报错
parent
a4e4f57f
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
7 deletions
+14
-7
App.vue
src/App.vue
+4
-0
NodeTemplateKit.ts
src/kit/NodeTemplateKit.ts
+8
-5
Figures.ts
src/kit/extensions/Figures.ts
+0
-0
GuidedDraggingTool.ts
src/kit/extensions/GuidedDraggingTool.ts
+2
-2
No files found.
src/App.vue
View file @
8a9f9148
...
...
@@ -13,6 +13,7 @@
</el-button>
<el-button
text
icon=
"Setting"
></el-button>
<div
class=
"flex-1"
></div>
<!-- <el-switch v-model="ifRealTimeData"> 模拟实时数据</el-switch>-->
<el-button
icon=
"Refresh"
@
click=
"changeData"
>
数据变化
</el-button>
<el-button
icon=
"Download"
@
click=
"importData"
>
导入
</el-button>
<el-button
type=
"primary"
icon=
"Upload"
@
click=
"exportData"
>
导出
</el-button>
...
...
@@ -134,6 +135,8 @@ const diagramConfig = ref({
canRedo
:
false
})
// const ifRealTimeData = ref(false)
let
myDiagram
:
any
=
null
let
inspector
:
any
=
null
const
ifSelectNode
=
ref
(
false
)
...
...
@@ -329,6 +332,7 @@ function initInspector(){
}
}
)
console
.
log
(
inspector
.
properties
)
}
function
confirmAddPort
(){
...
...
src/kit/NodeTemplateKit.ts
View file @
8a9f9148
...
...
@@ -30,7 +30,7 @@ export function makeShapeNode (size:number){
new
go
.
Binding
(
"figure"
,
"shape"
),
new
go
.
Binding
(
"fill"
,
"fill"
),
new
go
.
Binding
(
"stroke"
,
"stroke"
),
// todo 边框会失效
// todo 边框会失效
new
go
.
Binding
(
'desiredSize'
,
"size"
,
go
.
Size
.
parse
),
)
}
...
...
@@ -46,6 +46,8 @@ export function makeNodeTemplate(type:string, size:number){
return
makeGeometryNode
(
size
)
case
'shape'
:
return
makeShapeNode
(
size
)
default
:
return
GO
(
go
.
Shape
)
}
}
...
...
@@ -66,7 +68,8 @@ export function makeDiagramNodeTemplate(type:string, size:number){
)
}
export
function
makeSourcePanelNodeTemplate
(
type
:
string
,
size
:
number
){
export
function
makeSourcePanelNodeTemplate
(
nodeType
:
string
,
size
:
number
){
let
previewSize
=
size
*
3
return
GO
(
go
.
Node
,
"Auto"
,
{
selectionAdornmentTemplate
:
GO
(
go
.
Adornment
)},
{
width
:
40
,
height
:
40
},
...
...
@@ -81,12 +84,12 @@ export function makeSourcePanelNodeTemplate(type:string, size:number){
GO
(
go
.
Shape
,
"RoundedRectangle"
,
{
width
:
40
,
height
:
40
,
stroke
:
null
,
fill
:
null
,
name
:
"SHAPE"
},
),
makeNodeTemplate
(
t
ype
,
size
),
makeNodeTemplate
(
nodeT
ype
,
size
),
{
toolTip
:
GO
(
'ToolTip'
,
{
width
:
100
},
GO
(
go
.
Panel
,
"Vertical"
,
makeNodeTemplate
(
type
,
size
*
3
),
GO
(
go
.
Shape
,
"LineH"
,
{
width
:
100
,
height
:
10
}),
makeNodeTemplate
(
nodeType
,
previewSize
),
GO
(
go
.
Shape
,
{
figure
:
"LineH"
,
width
:
100
,
height
:
10
}),
GO
(
go
.
TextBlock
,
{
margin
:
5
},
new
go
.
Binding
(
"text"
,
"name"
))
)
)
...
...
src/kit/extensions/Figures.ts
deleted
100644 → 0
View file @
a4e4f57f
This source diff could not be displayed because it is too large. You can
view the blob
instead.
src/kit/extensions/GuidedDraggingTool.ts
View file @
8a9f9148
...
...
@@ -210,7 +210,7 @@ export class GuidedDraggingTool extends go.DraggingTool {
/**
* Shows vertical and horizontal guidelines for the dragged part.
*/
public
doDragOver
(
pt
:
go
.
Point
,
obj
:
go
.
GraphObject
):
void
{
public
doDragOver
(
_pt
:
go
.
Point
,
_
obj
:
go
.
GraphObject
):
void
{
// clear all existing guidelines in case either show... method decides to show a guideline
this
.
clearGuidelines
();
...
...
@@ -230,7 +230,7 @@ export class GuidedDraggingTool extends go.DraggingTool {
* On a mouse-up, snaps the selected part to the nearest guideline.
* If not snapping, the part remains at its position.
*/
public
doDropOnto
(
pt
:
go
.
Point
,
obj
:
go
.
GraphObject
):
void
{
public
doDropOnto
(
_pt
:
go
.
Point
,
_
obj
:
go
.
GraphObject
):
void
{
this
.
clearGuidelines
();
// gets the selected (perhaps copied) Part
...
...
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