mirror of
https://git.datalinker.icu/comfyanonymous/ComfyUI
synced 2026-11-19 22:57:03 +08:00
optimize
This commit is contained in:
parent
1f9e88fcd1
commit
eb3b6c0581
@ -338,8 +338,8 @@ class MaskEditorDialog extends ComfyDialog {
|
|||||||
var centerX = self.cursorX;
|
var centerX = self.cursorX;
|
||||||
var centerY = self.cursorY;
|
var centerY = self.cursorY;
|
||||||
|
|
||||||
brush.style.width = (self.brush_size - 1) * 2 + "px";
|
brush.style.width = self.brush_size * 2 + "px";
|
||||||
brush.style.height = (self.brush_size - 1) * 2 + "px";
|
brush.style.height = self.brush_siz * 2 + "px";
|
||||||
brush.style.left = (centerX - self.brush_size) + "px";
|
brush.style.left = (centerX - self.brush_size) + "px";
|
||||||
brush.style.top = (centerY - self.brush_size) + "px";
|
brush.style.top = (centerY - self.brush_size) + "px";
|
||||||
}
|
}
|
||||||
@ -393,7 +393,7 @@ class MaskEditorDialog extends ComfyDialog {
|
|||||||
var directionX = dx / distance;
|
var directionX = dx / distance;
|
||||||
var directionY = dy / distance;
|
var directionY = dy / distance;
|
||||||
|
|
||||||
for (var i = 0; i < distance; i++) {
|
for (var i = 0; i < distance; i+=5) {
|
||||||
var px = self.lastx + (directionX * i);
|
var px = self.lastx + (directionX * i);
|
||||||
var py = self.lasty + (directionY * i);
|
var py = self.lasty + (directionY * i);
|
||||||
self.maskCtx.arc(px, py, this.brush_size, 0, Math.PI * 2, false);
|
self.maskCtx.arc(px, py, this.brush_size, 0, Math.PI * 2, false);
|
||||||
@ -432,7 +432,7 @@ class MaskEditorDialog extends ComfyDialog {
|
|||||||
var directionX = dx / distance;
|
var directionX = dx / distance;
|
||||||
var directionY = dy / distance;
|
var directionY = dy / distance;
|
||||||
|
|
||||||
for (var i = 0; i < distance; i++) {
|
for (var i = 0; i < distance; i+=5) {
|
||||||
var px = self.lastx + (directionX * i);
|
var px = self.lastx + (directionX * i);
|
||||||
var py = self.lasty + (directionY * i);
|
var py = self.lasty + (directionY * i);
|
||||||
self.maskCtx.arc(px, py, this.brush_size, 0, Math.PI * 2, false);
|
self.maskCtx.arc(px, py, this.brush_size, 0, Math.PI * 2, false);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user