mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-09 01:20:09 +00:00
[Bug] Fix convert dom widget placeholder render (#3256)
This commit is contained in:
@@ -56,6 +56,9 @@ export interface ComponentWidget<V extends object | string>
|
||||
|
||||
export interface DOMWidgetOptions<V extends object | string>
|
||||
extends IWidgetOptions {
|
||||
/**
|
||||
* Whether to render a placeholder rectangle when zoomed out.
|
||||
*/
|
||||
hideOnZoom?: boolean
|
||||
selectOn?: string[]
|
||||
onHide?: (widget: BaseDOMWidget<V>) => void
|
||||
@@ -145,7 +148,7 @@ abstract class BaseDOMWidgetImpl<V extends object | string>
|
||||
widget_height: number,
|
||||
lowQuality?: boolean
|
||||
): void {
|
||||
if (this.options.hideOnZoom && lowQuality) {
|
||||
if (this.options.hideOnZoom && lowQuality && this.isVisible()) {
|
||||
// Draw a placeholder rectangle
|
||||
const originalFillStyle = ctx.fillStyle
|
||||
ctx.beginPath()
|
||||
|
||||
Reference in New Issue
Block a user