From c507289753edf17c59ff8c15004db5fc959b4eca Mon Sep 17 00:00:00 2001 From: sebastjan Date: Mon, 31 Aug 2026 16:43:25 +0200 Subject: [PATCH] fiksna enota ohrani svojo visino: prilagajanje kreativi je 300x400 raztegnilo na 300x600 --- client/src/components/adsense.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/client/src/components/adsense.tsx b/client/src/components/adsense.tsx index 38a9145..ddfa3c1 100644 --- a/client/src/components/adsense.tsx +++ b/client/src/components/adsense.tsx @@ -50,6 +50,9 @@ export default function AdSense({ // Nic se ne odreze - visina je natanko taksna kot oglas. let fitTimers: ReturnType[] = []; const fitToCreative = () => { + // Enota s trdno visino v style (fiksne Display enote) se ne prilagaja + // kreativi, sicer nam Google 300x400 razpotegne na 300x600. + if (style && typeof (style as any).height === "string") return; const f = ins?.querySelector("iframe") as HTMLIFrameElement | null; if (!ins || !f) return; const h = f.getBoundingClientRect().height;