-
Notifications
You must be signed in to change notification settings - Fork 4
/
main.js
62 lines (48 loc) · 1.18 KB
/
main.js
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
61
62
;(function(global, undefined){
'use strict';
var paper = new Snap(1200,1000);
var boxA = paper.rect(50, 50, 100, 100, 2).attr({
fill: "#FFF",
stroke: "#000",
strokeWidth: 1
});
var boxB = paper.rect(250, 50, 100, 100, 2).attr({
fill: "#FFF",
stroke: "#000",
strokeWidth: 1
});
var ab = new Connector(paper, boxA, 'right', boxB, 'left');
var boxC = paper.rect(50, 250, 100, 100, 2).attr({
fill: "#FFF",
stroke: "#000",
strokeWidth: 1
});
var boxD = paper.rect(250, 350, 100, 100, 2).attr({
fill: "#FFF",
stroke: "#000",
strokeWidth: 1
});
var cd = new Connector(paper, boxC, 'right', boxD, 'left');
var boxE = paper.rect(450, 50, 100, 100, 2).attr({
fill: "#FFF",
stroke: "#000",
strokeWidth: 1
});
var boxF = paper.rect(650, 50, 100, 100, 2).attr({
fill: "#FFF",
stroke: "#000",
strokeWidth: 1
});
var ef = new Connector(paper, boxE, 'left', boxF, 'right');
var boxG = paper.rect(450, 250, 100, 100, 2).attr({
fill: "#FFF",
stroke: "#000",
strokeWidth: 1
});
var boxH = paper.rect(650, 250, 100, 100, 2).attr({
fill: "#FFF",
stroke: "#000",
strokeWidth: 1
});
var gh = new Connector(paper, boxG, 'left', boxH, 'left');
}(this));