forked from extern/easydiffusion
Paint editor - translucent mask, more brush size options
This commit is contained in:
parent
f24d3d69af
commit
75cb052cca
@ -166,11 +166,12 @@ var IMAGE_EDITOR_SECTIONS = [
|
|||||||
name: "brush_size",
|
name: "brush_size",
|
||||||
title: "Brush Size",
|
title: "Brush Size",
|
||||||
default: 48,
|
default: 48,
|
||||||
options: [ 16, 24, 32, 48, 64 ],
|
options: [ 6, 12, 16, 24, 30, 40, 48, 64 ],
|
||||||
initElement: (element, option) => {
|
initElement: (element, option) => {
|
||||||
element.parentElement.style.flex = option
|
element.parentElement.style.flex = option
|
||||||
element.style.width = option + "px"
|
element.style.width = option + "px"
|
||||||
element.style.height = option + "px"
|
element.style.height = option + "px"
|
||||||
|
element.style['margin-right'] = '2px'
|
||||||
element.style["border-radius"] = (option / 2).toFixed() + "px"
|
element.style["border-radius"] = (option / 2).toFixed() + "px"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -384,6 +385,7 @@ class ImageEditor {
|
|||||||
|
|
||||||
if (this.inpainter) {
|
if (this.inpainter) {
|
||||||
this.selectOption("color", IMAGE_EDITOR_SECTIONS.find(s => s.name == "color").options.indexOf("#ffffff"))
|
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
|
// initialize the right-side controls
|
||||||
|
Loading…
Reference in New Issue
Block a user