Skip to content

Commit 0b897c0

Browse files
committed
added a forEach method to the zones.module
I'm also temporarily removing the `cap-width` class on all zones in a story body until we can update the WPS templates.
1 parent eeb3d2e commit 0b897c0

File tree

4 files changed

+20
-10
lines changed

4 files changed

+20
-10
lines changed

demo/story/index.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,17 +52,17 @@ <h1 class="h1">Far from the truth, some ugsome thrones are thought of simply as
5252
<p>A varus foxglove is a hair of the mind. Some posit the wavy smell to be less than childing. We can assume that any instance of a ruth can be construed as a boarish evening. However, a drill can hardly be considered a sparing brazil without also being a chick.</p>
5353

5454
<div class="zone grid combo">
55-
<div id="zone-el-102" class="zone"></div>
56-
<div id="zone-el-103" class="zone"></div>
55+
<div id="zone-el-102" class="zone cap-width"></div>
56+
<div id="zone-el-103" class="zone cap-width"></div>
5757
</div>
5858

5959
<p>Bones are mastless crooks. This could be, or perhaps a turgent professor's drive comes with it the thought that the spousal breath is a daisy. Far from the truth, the crossbred gender reveals itself as a tailored day to those who look. The fronded parallelogram comes from an eerie throne.</p>
6060
<p>The fighter is a polyester. The girlish accountant comes from a petrous grease. A mandolin is the man of a kayak. The step-brother of a novel becomes a breezy linen.</p>
6161
<p>Before examples, quails were only daughters. Though we assume the latter, the equinoxes could be said to resemble toilful beefs. In ancient times we can assume that any instance of a clutch can be construed as a ratite centimeter. The taloned flavor comes from an oaken mexico.</p>
6262

6363
<div class="zone grid combo">
64-
<div id="zone-el-104" class="zone"></div>
65-
<div id="zone-el-105" class="zone"></div>
64+
<div id="zone-el-104" class="zone cap-width"></div>
65+
<div id="zone-el-105" class="zone cap-width"></div>
6666
</div>
6767

6868
<p>The destined employer comes from an elfish headline. Some assert that some modish bakers are thought of simply as prices. In modern times the amusement is an ounce. They were lost without the tenor phone that composed their james.</p>

lib/locker.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const locker = {
2525
// user info
2626
user: {
2727
isSubscriber() {
28-
return false;
28+
return true;
2929
},
3030

3131
isLoggedIn() {

lib/story.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,17 @@ export function render(locker) {
1717
// Generate a zone for everything there
1818
wps.forEach(ele => new zones.Zone(ele.id))
1919

20-
// Need a quick fix for OpenWeb until SDS 1.16.6 is live
20+
// Temp fix for OpenWeb until SDS 1.16.6 is live
2121
zones.get("zone-el-16").classList.remove("zone");
2222

23+
// Temp fix for combo zones until WPS can be updated
24+
zones.forEach(zone => {
25+
zone.classList.remove("cap-width");
26+
});
27+
2328
// Ignore these zones
2429
zones.ignore("zone-el-16");
2530

26-
// Delete these zones
27-
// zones.remove("zone-el-102");
28-
// zones.remove("zone-el-104");
29-
3031
// Remove the combo zone containers
3132
combos.forEach(ele => ele.remove());
3233

lib/zones.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,15 @@ export function remove(id) {
158158
map.delete(id);
159159
}
160160

161+
/*
162+
* Loops through the zone map
163+
* @param callback {function} the callback function for each zone
164+
*/
165+
166+
export function forEach(callback) {
167+
return map.forEach(callback);
168+
}
169+
161170
/*
162171
* Logs a message for other teams
163172
* @param id {string} the id of the zone

0 commit comments

Comments
 (0)