-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathscript.js
36 lines (32 loc) · 902 Bytes
/
script.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
// Pauses main carousel on modal click
$('.modal').on('shown.bs.modal', function (e) {
$('.mainCarousel').carousel('pause');
})
// Return main carousel cycle on modal close
$('.modal').on('hidden.bs.modal', function () {
$('.mainCarousel').carousel('cycle');
})
// Create text over room svgs
var textData = [
{"name": "4.1", "x": 775, "y": 250},
{"name": "4.2", "x": 580, "y": 225},
{"name": "4.3", "x": 410, "y": 140},
{"name": "3.2", "x": 387, "y": 320},
{"name": "2.2", "x": 400, "y": 510},
{"name": "1.1", "x": 775, "y": 853},
{"name": "1.2", "x": 360, "y": 690},
{"name": "Den", "x": 625, "y": 1030}
];
var svgContainer = d3.select("svg");
svgContainer.selectAll("text")
.data(textData)
.enter()
.append("text")
.classed("room-text", true)
.text(function(d,i) { return d.name; })
.attr("x", function(d) {
return d.x;
})
.attr("y", function(d) {
return d.y;
});