{ // await invoke("log", { // msg: `Resized`, // }); pos = { x: 0, y: 0 }; let rect = bar.getBoundingClientRect(); let prect = point.getBoundingClientRect(); pos.y = -(setpoint / 100) * rect.height + prect.height; }} />
{#if withSetpoint}
(pos = undefined), handle: ".handle", position: pos, axis: "y", bounds: "parent", onDragEnd: (e) => { let rect = bar.getBoundingClientRect(); let y = (e.domRect.y - rect.y + e.domRect.height / 2) / rect.height; onSetpointChange(1.0 - y); }, }} >
{/if}