enh: svg zoom pan

This commit is contained in:
Timothy J. Baek
2024-10-06 12:51:29 -07:00
parent 913620ff0c
commit babfc97c90
6 changed files with 130 additions and 30 deletions
@@ -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);
}