diff --git a/__pycache__/iframe_view.cpython-312.pyc b/__pycache__/iframe_view.cpython-312.pyc index 7ce8138..1a5c4ea 100644 Binary files a/__pycache__/iframe_view.cpython-312.pyc and b/__pycache__/iframe_view.cpython-312.pyc differ diff --git a/iframe_view.py b/iframe_view.py index 6a63def..fe75e36 100644 --- a/iframe_view.py +++ b/iframe_view.py @@ -129,11 +129,10 @@ class IframeView: "scene_state": ( "STRING", { - "multiline": True, "default": "{\"camera\": {\"position\": [0,0,5]}, \"animation\": false}", }, ), - "frame_count": ("INT", {"default": 4, "min": 1, "max": 60}), + "frame_count": ("INT", {"default": 4, "min": 1, "max": 400}), }, "hidden": { "unique_id": "UNIQUE_ID", diff --git a/js/iframe_view.js b/js/iframe_view.js index 585b789..0d2cd83 100644 --- a/js/iframe_view.js +++ b/js/iframe_view.js @@ -7,6 +7,12 @@ window.TEXTURE_STORE = window.TEXTURE_STORE || {}; // Function to create the iframe widget async function widgetIframe(node, nodeData, inputData, app) { + // Locate our parameter widgets + const urlWidget = node.widgets.find((w) => w.name === "url"); + const widthWidget = node.widgets.find((w) => w.name === "width"); + const heightWidget = node.widgets.find((w) => w.name === "height"); + const stateWidget = node.widgets.find((w) => w.name === "scene_state"); + console.log("[widgetIframe] Initializing iframe widget for node:", node); node.isCaptureComplete = false; // Create iframe wrapper with some styling @@ -23,8 +29,8 @@ async function widgetIframe(node, nodeData, inputData, app) { // Create the iframe element const iframe = $el("iframe", { style: { - width: "100%", - height: "100%", + width: widthWidget.value + "px", + height: heightWidget.value + "px", border: "none", }, sandbox: "allow-scripts allow-same-origin allow-forms", @@ -33,12 +39,6 @@ async function widgetIframe(node, nodeData, inputData, app) { iframeWrapper.appendChild(iframe); - // Locate our parameter widgets - const urlWidget = node.widgets.find((w) => w.name === "url"); - const widthWidget = node.widgets.find((w) => w.name === "width"); - const heightWidget = node.widgets.find((w) => w.name === "height"); - const stateWidget = node.widgets.find((w) => w.name === "scene_state"); - // Set initial URL if provided if (urlWidget.value) { iframe.src = urlWidget.value;