MCPcopy Create free account
hub / github.com/codecombat/codecombat / getPortraitImage

Method getPortraitImage

app/models/ThangType.js:359–364  ·  view source on GitHub ↗
(spriteOptionsOrKey, size)

Source from the content-addressed store, hash-verified

357 getGender () { return ThangTypeLib.getGender(this.attributes) }
358
359 getPortraitImage (spriteOptionsOrKey, size) {
360 if (size == null) { size = 100 }
361 const src = this.getPortraitSource(spriteOptionsOrKey, size)
362 if (!src) { return null }
363 return $('<img />').attr('src', src)
364 }
365
366 getPortraitSource (spriteOptionsOrKey, size) {
367 if (size == null) { size = 100 }

Callers 1

updatePortraitMethod · 0.80

Calls 1

getPortraitSourceMethod · 0.95

Tested by

no test coverage detected