mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-01-30 12:59:55 +00:00
Refresh Preview3D node with node.onMouseEnter (#2439)
This commit is contained in:
@@ -29,6 +29,12 @@ app.registerExtension({
|
||||
|
||||
containerToLoad3D.set(container.id, load3d)
|
||||
|
||||
node.onMouseEnter = function () {
|
||||
if (load3d) {
|
||||
load3d.refreshViewport()
|
||||
}
|
||||
}
|
||||
|
||||
node.onResize = function () {
|
||||
if (load3d) {
|
||||
load3d.handleResize()
|
||||
@@ -192,6 +198,12 @@ app.registerExtension({
|
||||
|
||||
containerToLoad3D.set(container.id, load3d)
|
||||
|
||||
node.onMouseEnter = function () {
|
||||
if (load3d) {
|
||||
load3d.refreshViewport()
|
||||
}
|
||||
}
|
||||
|
||||
node.onResize = function () {
|
||||
if (load3d) {
|
||||
load3d.handleResize()
|
||||
@@ -362,6 +374,12 @@ app.registerExtension({
|
||||
|
||||
containerToLoad3D.set(container.id, load3d)
|
||||
|
||||
node.onMouseEnter = function () {
|
||||
if (load3d) {
|
||||
load3d.refreshViewport()
|
||||
}
|
||||
}
|
||||
|
||||
node.onResize = function () {
|
||||
if (load3d) {
|
||||
load3d.handleResize()
|
||||
@@ -482,6 +500,12 @@ app.registerExtension({
|
||||
|
||||
containerToLoad3D.set(container.id, load3d)
|
||||
|
||||
node.onMouseEnter = function () {
|
||||
if (load3d) {
|
||||
load3d.refreshViewport()
|
||||
}
|
||||
}
|
||||
|
||||
node.onResize = function () {
|
||||
if (load3d) {
|
||||
load3d.handleResize()
|
||||
|
||||
@@ -892,6 +892,10 @@ class Load3d {
|
||||
this.handleResize()
|
||||
}
|
||||
|
||||
refreshViewport() {
|
||||
this.handleResize()
|
||||
}
|
||||
|
||||
handleResize() {
|
||||
const parentElement = this.renderer?.domElement?.parentElement
|
||||
|
||||
|
||||
Reference in New Issue
Block a user