Skip to content

AI-native knowledge base & Evernote/Obsidian alternative with instant sync & native MCP. Free on Cloudflare or self-hosted via Docker.

fix: constrain infographic preview size

tianma-ifd7be5bcc06bb
diff --git a/apps/web/src/components/InfographicEditorPane.tsx b/apps/web/src/components/InfographicEditorPane.tsx
index 623723bb..1b4c882f 100644
--- a/apps/web/src/components/InfographicEditorPane.tsx
+++ b/apps/web/src/components/InfographicEditorPane.tsx
@@ -478,7 +478,7 @@ export default function InfographicEditorPane({ memo, repository, readOnly, onBa
</div>
</div>}
</section>
- <section className="min-h-0 overflow-auto bg-slate-50 p-4"><div className="min-h-[420px] rounded-xl border border-slate-200 bg-white p-4 shadow-sm"><div ref={containerRef} className="min-h-[380px] w-full" />{!syntax.trim() && <p className="pt-32 text-center text-sm text-slate-400">{t("infographic.noPreview")}</p>}{renderError && <p role="alert" className="text-sm text-red-600">{renderError}</p>}</div></section>
+ <section className="min-h-0 overflow-auto bg-slate-50 p-4"><div className="min-h-[420px] rounded-xl border border-slate-200 bg-white p-4 shadow-sm"><div ref={containerRef} className="edgeever-infographic-preview min-h-[380px] w-full" />{!syntax.trim() && <p className="pt-32 text-center text-sm text-slate-400">{t("infographic.noPreview")}</p>}{renderError && <p role="alert" className="text-sm text-red-600">{renderError}</p>}</div></section>
</div>
</div>;
}
diff --git a/apps/web/src/styles/globals.css b/apps/web/src/styles/globals.css
index d0e5a7e8..7ee4919d 100644
--- a/apps/web/src/styles/globals.css
+++ b/apps/web/src/styles/globals.css
@@ -12,6 +12,14 @@
outline-offset: 2px;
}
+.edgeever-infographic-preview > svg {
+ display: block;
+ width: min(100%, 760px);
+ height: auto;
+ max-height: min(800px, calc(100dvh - 180px));
+ margin-inline: auto;
+}
+
@keyframes edgeever-token-created {
0% {
opacity: 0;