1
1
<template >
2
2
<div class =" dhx-container_inner" >
3
3
<div class =" dhx_sample-controls" >
4
- <label class =" dhx_form-group dhx_radiobutton dhx_form-group--inline dhx_form-group--no-message-holder dhx_form-group dhx_sample-input__wrapper--pl-16" >
5
- <input id =" direct" type =" radio" name =" radio" value =" direct" class =" dhx_radiobutton__input" @change =" runDirect()" >
6
- <span class =" dhx_radiobutton__visual-input" ></span >
7
- <span class =" dhx_label" >Auto layout in direct mode</span >
8
- </label >
9
- <label class =" dhx_form-group dhx_radiobutton dhx_form-group--inline dhx_form-group--no-message-holder dhx_sample-input__wrapper--pl-16" >
10
- <input id =" edges" type =" radio" name =" radio" value =" edges" class =" dhx_radiobutton__input" @change =" runEdges()" >
11
- <span class =" dhx_radiobutton__visual-input" ></span >
12
- <span class =" dhx_label" >Auto layout in edges mode</span >
13
- </label >
14
- </div >
15
- <div class =" dhx_sample-container" >
16
- <div class =" dhx_sample-container__widget" ref =" diagram" ></div >
17
- </div >
4
+ <label
5
+ class =" dhx_form-group dhx_radiobutton dhx_form-group--inline dhx_form-group--no-message-holder dhx_form-group dhx_sample-input__wrapper--pl-16"
6
+ >
7
+ <input id =" direct" type =" radio" name =" radio" value =" direct" class =" dhx_radiobutton__input" @change =" runDirect()" />
8
+ <span class =" dhx_radiobutton__visual-input" ></span >
9
+ <span class =" dhx_label" >Auto layout in direct mode</span >
10
+ </label >
11
+ <label
12
+ class =" dhx_form-group dhx_radiobutton dhx_form-group--inline dhx_form-group--no-message-holder dhx_sample-input__wrapper--pl-16"
13
+ >
14
+ <input id =" edges" type =" radio" name =" radio" value =" edges" class =" dhx_radiobutton__input" @change =" runEdges()" />
15
+ <span class =" dhx_radiobutton__visual-input" ></span >
16
+ <span class =" dhx_label" >Auto layout in edges mode</span >
17
+ </label >
18
+ </div >
19
+ <div class =" dhx_sample-container" >
20
+ <div class =" dhx_sample-container__widget" ref =" diagram" ></div >
21
+ </div >
18
22
</div >
19
23
</template >
20
24
@@ -26,7 +30,10 @@ export default {
26
30
diagram: null ,
27
31
}),
28
32
mounted () {
29
- fromCDN ([" https://cdn.dhtmlx.com/diagram/pro/edge/diagramWithEditor.js" , " https://cdn.dhtmlx.com/diagram/pro/edge/diagramWithEditor.css" ]).then (() => {
33
+ fromCDN ([
34
+ " https://cdn.dhtmlx.com/diagram/pro/edge/diagramWithEditor.js" ,
35
+ " https://cdn.dhtmlx.com/diagram/pro/edge/diagramWithEditor.css" ,
36
+ ]).then (() => {
30
37
// eslint-disable-next-line no-undef
31
38
this .diagram = new dhx.Diagram (this .$refs .diagram );
32
39
this .diagram .data .load (" ./static/autoplacement.json" );
@@ -35,14 +42,14 @@ export default {
35
42
methods: {
36
43
runDirect () {
37
44
this .diagram .autoPlace ({
38
- mode: " direct"
45
+ mode: " direct" ,
39
46
});
40
47
},
41
48
runEdges () {
42
49
this .diagram .autoPlace ({
43
- mode: " edges"
50
+ mode: " edges" ,
44
51
});
45
- }
52
+ },
46
53
},
47
54
beforeDestroy () {
48
55
if (this .diagram ) {
0 commit comments