MCPcopy Index your code
hub / github.com/codecombat/codecombat / getPortraitSource

Method getPortraitSource

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

Source from the content-addressed store, hash-verified

364 }
365
366 getPortraitSource (spriteOptionsOrKey, size) {
367 if (size == null) { size = 100 }
368 if (this.get('rasterIcon') || this.get('raster')) { return this.getPortraitURL() }
369 const stage = this.getPortraitStage(spriteOptionsOrKey, size)
370 return (stage != null ? stage.toDataURL() : undefined)
371 }
372
373 getPortraitStage (spriteOptionsOrKey, size) {
374 let stage

Callers 4

getPortraitImageMethod · 0.95
uploadGenericPortraitMethod · 0.95
loadNamesMethod · 0.80
finishRenderingMethod · 0.80

Calls 3

getPortraitURLMethod · 0.95
getPortraitStageMethod · 0.95
getMethod · 0.45

Tested by

no test coverage detected