pure-canvas
Advanced tools
Comparing version
@@ -12,3 +12,3 @@ import Node, { Point, Bounds } from './Node'; | ||
private cachedBounds?; | ||
constructor({clipRegion}?: { | ||
constructor(options?: { | ||
clipRegion?: Bounds; | ||
@@ -15,0 +15,0 @@ }); |
@@ -7,7 +7,7 @@ "use strict"; | ||
class LayerCached extends Layer_1.default { | ||
constructor({ clipRegion } = {}) { | ||
constructor(options = {}) { | ||
super(); | ||
this.caching = false; | ||
this.indexFinished = false; | ||
this.clipRegion = clipRegion; | ||
this.clipRegion = options.clipRegion; | ||
} | ||
@@ -14,0 +14,0 @@ getBounds() { |
@@ -6,5 +6,5 @@ import Node, { Bounds, Point } from './Node'; | ||
private _y; | ||
constructor({x, y}?: { | ||
x?: number; | ||
y?: number; | ||
constructor(options?: { | ||
x: number; | ||
y: number; | ||
}); | ||
@@ -11,0 +11,0 @@ preDraw(context: CanvasRenderingContext2D): void; |
@@ -5,6 +5,6 @@ "use strict"; | ||
class Scale extends TransformerBase_1.default { | ||
constructor({ x = 0, y = 0 } = {}) { | ||
constructor(options = { x: 0, y: 0 }) { | ||
super(); | ||
this._x = x; | ||
this._y = y; | ||
this._x = options.x; | ||
this._y = options.y; | ||
} | ||
@@ -11,0 +11,0 @@ preDraw(context) { |
@@ -6,5 +6,5 @@ import Node, { Bounds, Point } from './Node'; | ||
private _y; | ||
constructor({x, y}?: { | ||
x?: number; | ||
y?: number; | ||
constructor(options?: { | ||
x: number; | ||
y: number; | ||
}); | ||
@@ -11,0 +11,0 @@ preDraw(context: CanvasRenderingContext2D): void; |
@@ -5,6 +5,6 @@ "use strict"; | ||
class Translate extends TransformerBase_1.default { | ||
constructor({ x = 0, y = 0 } = {}) { | ||
constructor(options = { x: 0, y: 0 }) { | ||
super(); | ||
this._x = x; | ||
this._y = y; | ||
this._x = options.x; | ||
this._y = options.y; | ||
} | ||
@@ -11,0 +11,0 @@ preDraw(context) { |
{ | ||
"name": "pure-canvas", | ||
"version": "0.6.7", | ||
"version": "0.6.8", | ||
"description": "TODO", | ||
@@ -5,0 +5,0 @@ "main": "lib/Stage.js", |
@@ -23,5 +23,5 @@ import Node, {Point, Bounds} from './Node'; | ||
constructor({clipRegion}: {clipRegion?: Bounds} = {}) { | ||
constructor(options: {clipRegion?: Bounds} = {}) { | ||
super(); | ||
this.clipRegion = clipRegion; | ||
this.clipRegion = options.clipRegion; | ||
} | ||
@@ -28,0 +28,0 @@ |
@@ -9,6 +9,6 @@ import Node, {Bounds, Point} from './Node'; | ||
constructor({x = 0, y = 0} = {}) { | ||
constructor(options: {x: number, y: number} = {x: 0, y: 0}) { | ||
super(); | ||
this._x = x; | ||
this._y = y; | ||
this._x = options.x; | ||
this._y = options.y; | ||
} | ||
@@ -15,0 +15,0 @@ |
@@ -9,6 +9,6 @@ import Node, {Bounds, Point} from './Node'; | ||
constructor({x = 0, y = 0} = {}) { | ||
constructor(options: {x: number, y: number} = {x: 0, y: 0}) { | ||
super(); | ||
this._x = x; | ||
this._y = y; | ||
this._x = options.x; | ||
this._y = options.y; | ||
} | ||
@@ -15,0 +15,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
238566
0.07%