-
Notifications
You must be signed in to change notification settings - Fork 4
/
68830_RE_01_02.html
169 lines (159 loc) · 10.1 KB
/
68830_RE_01_02.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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta content="width=device-width, initial-scale=1.0" name="viewport">
<meta content="Tabbed Image Carousel Brix" name="description">
<!-- widgets.css contains styling for the interactive brix -->
<link href="css/widgets.css" rel="stylesheet">
</head>
<body>
<div id="b265edf28834c4b788a576291a315b742"></div>
<script src="js/d3.v3.min.js"></script>
<script src="js/brixlib-compiled.js"></script>
<script>
// Create an object that will contain the objects needed for the activities
// on this page.
pearson.brix.activity = {};
var a = pearson.brix.activity;
// The activity config that defines the brix and mortar for this page
//
// Set imgBaseUrl to imgBaseUrl": "http://localhost:8088/images/", or whatever server the IPS is running
// on to serve the images that route, or just leave it empty ("imgBaseUrl": "",) to point to images
// local to this html file
a.config =
{
"description": "Changing landscape surrounding the Three Gorges Dam",
//"imgBaseUrl": "http://localhost:8088/images/",
"imgBaseUrl": "",
"containerConfig":
[
{
"description": "Container for the LabelCarousel",
"containerId": "b265edf28834c4b788a576291a315b742",
"brixConfig":
[
{
"bricId": "lblCarousel1",
"bricType": "LabelCarousel",
"config":
{
"id": "lblCrsl1",
"imagesActualSize": { "height": 335, "width": 457 },
"type": "textLabels",
"displayWidth": 457
},
"configFixup":
[
{
"type": "set-property",
"name": "images",
"value":
{
"type": "array",
"elements":
[
{
"type": "object",
"properties":
[
{
"name": "URI",
"value":
{
"type": "join",
"parts":
[
{ "type": "ref", "domain": "info", "refId": "imgBaseUrl" },
{ "type": "constant", "value": "img/68830_RE_01_02a_S1.jpg" }
]
}
},
{
"name": "caption",
"value": { "type": "constant", "value": "The Yangtze River before dam construction" }
},
{
"name": "selectorLabel",
"value": { "type": "constant", "value": "1987"}
}
]
},
{
"type": "object",
"properties":
[
{
"name": "URI",
"value":
{
"type": "join",
"parts":
[
{ "type": "ref", "domain": "info", "refId": "imgBaseUrl" },
{ "type": "constant", "value": "img/68830_RE_01_02a_S2.png" }
]
}
},
{
"name": "caption",
"value": { "type": "constant", "value": "Operational dam with filled reservoir" }
},
{
"name": "selectorLabel",
"value": { "type": "constant", "value": "2006" }
}
]
}
]
}
}
]
},
{
"bricId": "cntr1",
"bricType": "SvgContainer",
"config":
{
"maxSize": { "height": 720, "width": 457 }
},
"configFixup":
[
{
"type": "set-property",
"name": "node",
"value":
{
"type": "d3select",
"selector": "#b265edf28834c4b788a576291a315b742"
}
}
]
}
],
"hookupActions":
[
{
"description": "Append the label image carousel to the svg container",
"type": "method-call",
"instance": {"type": "ref", "domain": "brix", "refId": "cntr1"},
"methodName": "append",
"args":
[
{ "type": "ref", "domain": "brix", "refId": "lblCarousel1" }
]
}
]
}
]
};
// create the eventmanager to be used by the created brix, and the
// bricLayer which will create them, and then tell the bricLayer to build.
a.eventManager = new pearson.utils.EventManager();
a.answerMan = new pearson.brix.utils.LocalAnswerMan();
a.submitManager = new pearson.brix.utils.SubmitManager(a.eventManager, a.answerMan);
a.bricLayer = new pearson.brix.BricLayer(null, a.eventManager, a.submitManager);
a.building = a.bricLayer.build(a.config);
</script>
</body>
</html>