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

Method zoom

app/views/play/SpectateView.js:279–281  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

277 const bounds = [{ x: worldBounds.left, y: worldBounds.top }, { x: worldBounds.right, y: worldBounds.bottom }]
278 this.surface.camera.setBounds(bounds)
279 const zoom = () => {
280 return (this.surface != null ? this.surface.camera.zoomTo({ x: (worldBounds.right - worldBounds.left) / 2, y: (worldBounds.top - worldBounds.bottom) / 2 }, 0.1, 0) : undefined)
281 }
282 return _.delay(zoom, 4000) // call it later for some reason (TODO: figure this out)
283 }
284

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected