Changeset View
Changeset View
Standalone View
Standalone View
src/activities/gletters/gletters.js
Context not available. | |||||
290 | 290 | | |||
---|---|---|---|---|---|
291 | var word | 291 | var word | ||
292 | 292 | | |||
293 | if(items.ourActivity.getImage(text)) { | 293 | var modText = parseInt(text) % items.numberLimit + "" | ||
294 | | ||||
295 | if(items.ourActivity.getImage(modText)) { | ||||
294 | word = wordComponent.createObject( items.background, | 296 | word = wordComponent.createObject( items.background, | ||
295 | { | 297 | { | ||
296 | "text": text, | 298 | "text": modText, | ||
297 | "image": items.ourActivity.getImage(text), | 299 | "image": items.ourActivity.getImage(modText), | ||
298 | // assume x=width-25px for now, Word auto-adjusts onCompleted(): | 300 | // assume x=width-25px for now, Word auto-adjusts onCompleted(): | ||
299 | "x": Math.random() * (items.main.width - 25), | 301 | "x": Math.random() * (items.main.width - 25), | ||
300 | "y": -25, | 302 | "y": -25, | ||
301 | }); | 303 | }); | ||
302 | } else if(items.ourActivity.getDominoValues(text).length) { | 304 | } else if(items.ourActivity.getDominoValues(modText).length) { | ||
303 | word = wordComponent.createObject( items.background, | 305 | word = wordComponent.createObject( items.background, | ||
304 | { | 306 | { | ||
305 | "text": text, | 307 | "text": modText, | ||
306 | "dominoValues": items.ourActivity.getDominoValues(text), | 308 | "dominoValues": items.ourActivity.getDominoValues(modText), | ||
307 | // assume x=width-25px for now, Word auto-adjusts onCompleted(): | 309 | // assume x=width-25px for now, Word auto-adjusts onCompleted(): | ||
308 | "x": Math.random() * (items.main.width - 25), | 310 | "x": Math.random() * (items.main.width - 25), | ||
309 | "y": -25, | 311 | "y": -25, | ||
Context not available. |