pure-canvas
Advanced tools
Comparing version
@@ -75,3 +75,8 @@ "use strict"; | ||
if (context) { | ||
context.drawImage(this.cache, minX, minY, width, height); | ||
try { | ||
context.drawImage(this.cache, minX, minY, width, height); | ||
} | ||
catch (error) { | ||
// Ignore | ||
} | ||
} | ||
@@ -78,0 +83,0 @@ return true; |
{ | ||
"name": "pure-canvas", | ||
"version": "0.6.13", | ||
"version": "0.6.14", | ||
"description": "TODO", | ||
@@ -5,0 +5,0 @@ "main": "lib/Stage.js", |
@@ -1,2 +0,2 @@ | ||
import Node, {Point, Bounds} from './Node'; | ||
import Node, { Point, Bounds } from './Node'; | ||
import Layer from './Layer'; | ||
@@ -6,3 +6,3 @@ import TreeManager from './TreeManager'; | ||
import NodeIndexable from './NodeIndexable'; | ||
import {getSafeContext} from './util'; | ||
import { getSafeContext } from './util'; | ||
@@ -24,3 +24,3 @@ export default class LayerCached<T> extends Layer<T> { | ||
constructor(options: {clipRegion?: Bounds} = {}) { | ||
constructor(options: { clipRegion?: Bounds } = {}) { | ||
super(); | ||
@@ -53,3 +53,3 @@ this.clipRegion = options.clipRegion; | ||
} else { | ||
const {minX, minY, maxX, maxY} = this.getBounds(); | ||
const { minX, minY, maxX, maxY } = this.getBounds(); | ||
if (!this.cache) { | ||
@@ -70,3 +70,3 @@ this.caching = true; | ||
if (!this.generator) { | ||
const {minX, minY, maxX, maxY} = this.getBounds(); | ||
const { minX, minY, maxX, maxY } = this.getBounds(); | ||
const width = maxX - minX; | ||
@@ -94,3 +94,7 @@ const height = maxY - minY; | ||
if (context) { | ||
context.drawImage(this.cache, minX, minY, width, height); | ||
try { | ||
context.drawImage(this.cache, minX, minY, width, height); | ||
} catch (error) { | ||
// Ignore | ||
} | ||
} | ||
@@ -97,0 +101,0 @@ return true; |
Sorry, the diff of this file is not supported yet
165993
0.25%3202
0.28%