-
Notifications
You must be signed in to change notification settings - Fork 0
/
vis-js-edge.html
60 lines (51 loc) · 1.04 KB
/
vis-js-edge.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<link rel="import" href="../polymer/polymer.html">
<!--
An element representing a vis.js edge.
Example:
<vis-js-edge from="1" to="2"></vis-js-edge>
@group vis.js network
@element vis-js-edge
@demo demo/index.html
@hero hero.svg
-->
<dom-module id="vis-js-edge">
<style>
:host {
display: none;
}
</style>
</dom-module>
<script>
Polymer({
is: 'vis-js-edge',
properties: {
/**
* `from` specifies the nodeId from which the edge should start.
*/
from: {
type: String,
value: "",
},
/**
* `to` specifies the nodeId where the edge should end.
*/
to: {
type: String,
value: ""
},
/**
* `edgeObject` gives back the edge in object form.
*
* @type {{from: string, to: string}}
*/
edgeObject: {
type: Object,
value: "",
computed: "_computeEdgeObject(from, to)"
}
},
_computeEdgeObject: function(from, to) {
return {from: from, to: to};
}
});
</script>