From 601ac6a2e143333f9848e558a47e586bb7f6fc86 Mon Sep 17 00:00:00 2001 From: viliusle Date: Tue, 5 Jan 2021 23:36:57 +0200 Subject: [PATCH] #205 - fixed non-transparent setting support --- src/js/modules/edit/copy.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/js/modules/edit/copy.js b/src/js/modules/edit/copy.js index ae44ea4..1e5c55d 100644 --- a/src/js/modules/edit/copy.js +++ b/src/js/modules/edit/copy.js @@ -1,5 +1,6 @@ import config from "../../config"; import Base_layers_class from './../../core/base-layers.js'; +import File_save_class from './../file/save.js'; import Helper_class from './../../libs/helpers.js'; import alertify from './../../../../node_modules/alertifyjs/build/alertify.min.js'; @@ -16,6 +17,7 @@ class Copy_class { this.Base_layers = new Base_layers_class(); this.Helper = new Helper_class(); + this.File_save = new File_save_class(); //events document.addEventListener('keydown', (event) => { @@ -44,7 +46,7 @@ class Copy_class { if (config.TRANSPARENCY == false) { //add white background ctx.globalCompositeOperation = 'destination-over'; - this.fillCanvasBackground(ctx, '#ffffff'); + this.File_save.fillCanvasBackground(ctx, '#ffffff'); ctx.globalCompositeOperation = 'source-over'; }