enh: svg zoom pan

This commit is contained in:
Timothy J. Baek committed 2024-10-06 12:51:29 -07:00
1 parent 913620ff0c
commit babfc97c90
6 files changed
+130 -30

No files matched your search

@@ -71,9 +71,14 @@
dispatch('update', e.detail);
}}
on:code={(e) => {
const { lang } = e.detail;
console.log('code', lang);
if (['html', 'svg'].includes(lang) && !$mobile) {
const { lang, code } = e.detail;
console.log('lang', lang);
console.log('code', code);
if (
(['html', 'svg'].includes(lang) || (lang === 'xml' && code.includes('svg'))) &&
!$mobile
) {
showArtifacts.set(true);
showControls.set(true);
}