Skip to content

Commit c6d3d17

Browse files
committed
CE complete. Ready for SME.
No comments.
1 parent 3f36519 commit c6d3d17

File tree

1 file changed

+45
-44
lines changed

1 file changed

+45
-44
lines changed

Instructions/20480C_MOD11_LAK.md

Lines changed: 45 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
# Module 11: Creating Advanced Graphics.
1+
# Module 11: Creating Advanced Graphics
22

3-
# Lab: Creating Advanced Graphics.
3+
# Lab: Creating Advanced Graphics
44

55
### Lab Setup
66

77
### Preparation Steps
88

9-
1. Ensure that you have cloned the 20480C directory from GitHub. It contains the code segments for this course's labs and demos. https://github.com/MicrosoftLearning/20480-Programming-in-HTML5-with-JavaScript-and-CSS3/tree/master/Allfiles.
9+
Ensure that you have cloned the 20480C directory from GitHub (**https://github.com/MicrosoftLearning/20480-Programming-in-HTML5-with-JavaScript-and-CSS3/tree/master/Allfiles**). It contains the code segments for the labs and demos in this course.
1010

11-
### Exercise 1: Creating an Interactive Venue Map by Using SVG.
11+
### Exercise 1: Creating an Interactive Venue Map by Using SVG
1212

13-
#### Task 1: Review the incomplete HTML markup for the venue map.
13+
#### Task 1: Review the incomplete HTML markup for the venue map
1414

15-
1. Open **Visual Studio 2017**.
16-
2. In Visual Studio, on the **File** menu, point to **Open**, and then click **Project/Solution**.
15+
1. Open Microsoft Visual Studio 2017.
16+
2. In Visual Studio, on the **File** menu, point to **Open**, and then select **Project/Solution**.
1717
3. In the **Open Project** dialog box, browse to **Allfiles\Mod11\Labfiles\Starter\Exercise 1**, click **ContosoConf.sln**, and then click **Open**.
18-
4. In Solution Explorer, expand the **ContosoConf** project node, and then double-click **location.htm**.
18+
4. In **Solution Explorer**, expand the **ContosoConf** project node, and then double-click **location.htm**.
1919
5. Verify that the page contains the following HTML markup:
2020
```html
2121
<svg viewBox="-1 -1 302 102" width="100%" height="230">
@@ -35,18 +35,18 @@
3535
```html
3636
<script src="/scripts/pages/location-venue.js" type="text/javascript"></script>
3737
```
38-
7. On the **Debug** menu, click **Start Without Debugging**.
38+
7. On the **Debug** menu, click **Start Without Debugging**.
3939
8. Click **Location**.
40-
9. If the message **localhost wants to track your location** appears, click **Allow once**.
40+
9. If the **localhost wants to track your location** message appears, click **Allow once**.
4141
10. In the **Enable Location Services** dialog box, click **Yes**.
42-
11. If the message **Intranet settings are turned off by default** appears, click **Don’t show this message again**.
42+
11. If the **Intranet settings are turned off by default** message appears, click **Don’t show this message again**.
4343
12. Scroll down and view the venue map.
4444

4545
![alt text](./Images/20480B_11_Venue-Map.png "The incomplete venue map")
4646

4747
13. Close Microsoft Edge.
4848

49-
#### Task 2: Complete the SVG venue map.
49+
#### Task 2: Complete the SVG venue map
5050

5151
1. In Visual Studio, in **location.htm**, find the following comment:
5252
```html
@@ -60,9 +60,9 @@
6060
</g>
6161
```
6262

63-
#### Task 3: Add interactivity to the venue map.
63+
#### Task 3: Add interactivity to the venue map
6464

65-
1. In Solution Explorer, double-click **location.htm**.
65+
1. In **Solution Explorer**, double-click **location.htm**.
6666
2. Find the following HTML markup:
6767
```html
6868
<div id="room-a-info" style="display: none">
@@ -86,14 +86,14 @@
8686
</ul>
8787
</div>
8888
```
89-
3. In Solution Explorer, expand the **styles** folder, expand the **pages** folder, and then double-click **location.css**.
89+
3. In **Solution Explorer**, expand the **styles** folder, expand the **pages** folder, and then double-click **location.css**.
9090
4. At the end of the file, add the following CSS:
9191
```css
9292
.room:hover rect {
9393
fill: #b1f8b0;
9494
}
9595
```
96-
5. In Solution Explorer, expand the **scripts** folder, expand the **pages** folder, and then double-click **location-venue.js**.
96+
5. In **Solution Explorer**, expand the **scripts** folder, expand the **pages** folder, and then double-click **location-venue.js**.
9797
6. Find the following comment:
9898
```javascript
9999
// TODO: Get the room elements in the svg element.
@@ -116,62 +116,63 @@
116116
}
117117
```
118118

119-
#### Task 4: Test the application.
119+
#### Task 4: Test the application
120120

121-
1. In Solution Explorer, double-click **location.htm**.
121+
1. In **Solution Explorer**, double-click **location.htm**.
122122
2. On the **Debug** menu, click **Start Without Debugging**.
123-
3. In Microsoft Edge, if the message **localhost wants to track your physical location** appears, click **Allow once**.
124-
4. Scroll down to the venue map and hover the mouse over **Room A**.
123+
3. In Microsoft Edge, if the **localhost wants to track your physical location** message appears, click **Allow once**.
124+
4. Scroll down to the venue map and place the mouse pointer over **Room A**.
125125
5. Verify that the venue map looks similar to the following image:
126126

127127
![alt text](./Images/20480B_11_Venue-Map-Hover.png "The venue map with Room A highlighted")
128128

129-
6. Click **Room B**, verify that the room information is displayed, and that it is similar to the following image:
129+
6. Click **Room B**, verify that the room information is displayed and that it is similar to the following image:
130130

131131
![alt text](./Images/20480B_11_Venue-Map-Information.png "The details for Room B")
132132

133133
7. Close Microsoft Edge.
134134

135-
>**Results:** After completing this exercise, you will have a venue map that displays extra information when clicked.
135+
>**Results**: After completing this exercise, you will have a venue map that displays extra information when clicked.
136136
137-
### Exercise 2: Creating a Speaker Badge by Using the Canvas API.
137+
### Exercise 2: Creating a Speaker Badge by Using the Canvas API
138138

139-
#### Task 1: Create the canvas element.
139+
#### Task 1: Create the canvas element
140140

141-
1. In Visual Studio, on the **File** menu, point to **Open**, and then click **Project/Solution**.
142-
2. In the **Open Project** dialog box, browse to **Allfiles\Mod11\Labfiles\Starter\Exercise 2** click **ContosoConf.sln**, and then click **Open**.
143-
3. In Solution Explorer, expand the **ContosoConf** project, and then double-click **speaker-badge.htm**.
141+
1. In Visual Studio, on the **File** menu, point to **Open**, and then select **Project/Solution**.
142+
2. In the **Open Project** dialog box, browse to **Allfiles\Mod11\Labfiles\Starter\Exercise 2**, click **ContosoConf.sln**, and then click **Open**.
143+
3. In **Solution Explorer**, expand the **ContosoConf** project, and then double-click **speaker-badge.htm**.
144144
4. Find the following comment:
145145
```html
146146
<!-- TODO: Add canvas here -->
147147
```
148148
5. After this comment, add the following HTML markup:
149-
```html
149+
```
150+
html
150151
<canvas
151-
width="500"
152-
height="200"
152+
width="500"
153+
height="200"
153154
style="border: 1px solid "#888"
154155
data-speaker-id="234724"
155156
data-speaker-name="Mark Hanson">
156157
</canvas>
157158
```
158159

159-
#### Task 2: Draw the details for the badge.
160+
#### Task 2: Draw the details for the badge
160161

161-
1. In Solution Explorer, expand the **scripts** folder, expand the **pages** folder, and then double-click **speaker-badge.js**.
162+
1. In **Solution Explorer**, expand the **scripts** folder, expand the **pages** folder, and then double-click **speaker-badge.js**.
162163
2. Verify that the file contains the following JavaScript code:
163164
```javascript
164165
this.canvas = element.querySelector("canvas");
165166
```
166-
3. Find the following comment:
167+
3. Find the following comment:
167168
```javascript
168169
// TODO: Get the canvas's (this.canvas) context and assign to this.context
169170
```
170171
4. After this comment, add the following JavaScript code:
171172
```javascript
172173
this.context = this.canvas.getContext("2d");
173174
```
174-
5. Find the comment that starts with the following line:
175+
5. Find the comment that starts with the following line:
175176
```javascript
176177
// TODO: Draw the following by calling the helper methods of `this`
177178
```
@@ -187,7 +188,7 @@
187188
}
188189
this.drawBarCode(this.speakerId);
189190
```
190-
7. Find the following comment:
191+
7. Find the following comment:
191192
```javascript
192193
// TODO: Fill the canvas with a white rectangle
193194
```
@@ -196,22 +197,22 @@
196197
this.context.fillStyle = "white";
197198
this.context.fillRect(0, 0, this.canvas.width, this.canvas.height);
198199
```
199-
9. Find the comment that starts with the following line:
200+
9. Find the comment that starts with the following line:
200201
```javascript
201202
// TODO: Draw the image on the canvas
202203
```
203-
10. After the last line of this comment, add the following JavaScript code:
204+
10. After the last line of this comment, add the following JavaScript code:
204205
```javascript
205206
var size = Math.min(image.width, image.height);
206207
var sourceX = image.width / 2 - size / 2;
207208
var sourceY = image.height / 2 - size / 2;
208209
this.context.drawImage(image, sourceX, sourceY, size, size, 20, 20, 160, 160);
209210
```
210-
11. Find the comment that starts with the following line:
211+
11. Find the comment that starts with the following line:
211212
```javascript
212213
// TODO: Draw this.speakerName on the canvas
213214
```
214-
12. After the last line of this comment, add the following JavaScript code:
215+
12. After the last line of this comment, add the following JavaScript code:
215216
```javascript
216217
this.context.font = "40px sans-serif";
217218
this.context.fillStyle = "black";
@@ -220,19 +221,19 @@
220221
this.context.fillText(this.speakerName, 200, 60);
221222
```
222223

223-
#### Task 3: Test the application.
224+
#### Task 3: Test the application
224225

225-
1. In Solution Explorer, double-click **speaker-badge.htm**.
226+
1. In **Solution Explorer**, double-click **speaker-badge.htm**.
226227
2. On the **Debug** menu, click **Start Without Debugging**.
227-
3. On the taskbar, click **File Explorer** and then browse to the **Allfiles\Mod11\Labfiles\Resources** folder.
228-
4. Drag and drop **mark-hanson.jpg** from File Explorer onto the speaker badge in Microsoft Edge.
228+
3. On the taskbar, click **File Explorer**, and then browse to the **Allfiles\Mod11\Labfiles\Resources** folder.
229+
4. From File Explorer, drag **mark-hanson.jpg** onto the speaker badge in Microsoft Edge.
229230
5. Verify that the speaker badge looks similar to the following image:
230231

231232
![alt text](./Images/20480B_11_Speaker-Badge-Canvas.png "The speaker badge for Mark Hanson")
232233

233234
6. Close Microsoft Edge.
234235

235-
>**Results:** After completing this exercise, you will have a Speaker Badge page that enables a conference speaker to create their badge.
236+
>**Results**: After completing this exercise, you will have a Speaker Badge page that enables a conference speaker to create their badge.
236237

237238
©2018 Microsoft Corporation. All rights reserved.
238239

0 commit comments

Comments
 (0)