@biela.dev/core 1.7.8 → 1.7.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +15 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +15 -0
- package/dist/index.js.map +1 -1
- package/dist/lite.cjs +15 -0
- package/dist/lite.cjs.map +1 -1
- package/dist/lite.js +15 -0
- package/dist/lite.js.map +1 -1
- package/package.json +2 -2
package/dist/lite.cjs
CHANGED
|
@@ -726,6 +726,20 @@ function DeviceFrame({
|
|
|
726
726
|
react.useEffect(() => {
|
|
727
727
|
onScaleChangeRef.current?.(activeScale);
|
|
728
728
|
}, [activeScale]);
|
|
729
|
+
react.useEffect(() => {
|
|
730
|
+
const el = frameOverlayRef.current;
|
|
731
|
+
if (!el) return;
|
|
732
|
+
const svgs = el.querySelectorAll("svg");
|
|
733
|
+
svgs.forEach((svg) => {
|
|
734
|
+
if (!svg.getAttribute("viewBox")) {
|
|
735
|
+
const w = svg.getAttribute("width");
|
|
736
|
+
const h = svg.getAttribute("height");
|
|
737
|
+
if (w && h) svg.setAttribute("viewBox", `0 0 ${w} ${h}`);
|
|
738
|
+
}
|
|
739
|
+
svg.setAttribute("width", "100%");
|
|
740
|
+
svg.setAttribute("height", "100%");
|
|
741
|
+
});
|
|
742
|
+
});
|
|
729
743
|
const DeviceSVGComponent = svgEntry?.component;
|
|
730
744
|
const hasMeasured = containerW > 0 && containerH > 0;
|
|
731
745
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -803,6 +817,7 @@ function DeviceFrame({
|
|
|
803
817
|
left: 0,
|
|
804
818
|
width: frameTotalW,
|
|
805
819
|
height: frameTotalH,
|
|
820
|
+
overflow: "hidden",
|
|
806
821
|
pointerEvents: "none",
|
|
807
822
|
zIndex: 10
|
|
808
823
|
}
|