diff --git a/web/page/bspaint.js b/web/page/bspaint.js index 73b528c..5874a42 100644 --- a/web/page/bspaint.js +++ b/web/page/bspaint.js @@ -84,7 +84,7 @@ class Layer { ctx = this.canvas.getContext("2d",{willReadFrequently:true}); mask = false; visible = true; - composite = "source-over"; + compositeOperation = "source-over"; opacity = 1; _maskColor = lastUsedMaskColor; constructor (title, {width,height}, mask = false) { @@ -93,7 +93,7 @@ class Layer { this.mask = mask; this.title= title; if (mask) { - this.composite="source-over"; + this.compositeOperation="source-over"; } } get maskColor() { @@ -232,7 +232,7 @@ function createDrawArea(canvas = blankCanvas()) { if (suppressMask && this.mask==layer) continue; if (!layer.visible) continue; canvas.ctx.globalAlpha = layer.opacity; - canvas.ctx.globalCompositeOperation=layer.composite; + canvas.ctx.globalCompositeOperation=layer.compositeOperation; if (this.isDrawing && layer===this.activeLayer) { canvas.ctx.drawImage(activeOperationCanvas,0,0); } else { @@ -794,7 +794,7 @@ function poulateLayerControl() {