From d4a378827fbe004b1af9733ed0413d28650ec98e Mon Sep 17 00:00:00 2001 From: cmdr2 Date: Wed, 7 Dec 2022 12:27:40 +0530 Subject: [PATCH] Paint editor - translucent mask, more brush size options --- ui/media/js/image-editor.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ui/media/js/image-editor.js b/ui/media/js/image-editor.js index 68a00a19..39d97287 100644 --- a/ui/media/js/image-editor.js +++ b/ui/media/js/image-editor.js @@ -166,11 +166,12 @@ var IMAGE_EDITOR_SECTIONS = [ name: "brush_size", title: "Brush Size", default: 48, - options: [ 16, 24, 32, 48, 64 ], + options: [ 6, 12, 16, 24, 30, 40, 48, 64 ], initElement: (element, option) => { element.parentElement.style.flex = option element.style.width = option + "px" element.style.height = option + "px" + element.style['margin-right'] = '2px' element.style["border-radius"] = (option / 2).toFixed() + "px" } }, @@ -384,6 +385,7 @@ class ImageEditor { if (this.inpainter) { this.selectOption("color", IMAGE_EDITOR_SECTIONS.find(s => s.name == "color").options.indexOf("#ffffff")) + this.selectOption("opacity", IMAGE_EDITOR_SECTIONS.find(s => s.name == "opacity").options.indexOf(0.4)) } // initialize the right-side controls