Skip to content

Commit

Permalink
Minify print svg
Browse files Browse the repository at this point in the history
  • Loading branch information
paul121 authored Dec 12, 2024
1 parent bbed4c9 commit 408c9c1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/control/Snapshot/Snapshot.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class Snapshot extends Control {

// Create a print button.
const print = document.createElement('button');
print.innerHTML = '<svg viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"><title/><g><path d="M359,184H147a15,15,0,0,1-15-15V63a15,15,0,0,1,15-15H359a15,15,0,0,1,15,15V169A15,15,0,0,1,359,184ZM162,154H344V78H162Z"/><path d="M359,450H147a15,15,0,0,1-15-15V272.09a15,15,0,0,1,15-15H359a15,15,0,0,1,15,15V435A15,15,0,0,1,359,450ZM162,420H344V287.09H162Z"/><path d="M407.25,379H359a15,15,0,0,1,0-30h48.25a18.9,18.9,0,0,0,18.88-18.88V202.89A18.9,18.9,0,0,0,407.25,184H98.75a18.9,18.9,0,0,0-18.88,18.89V330.12A18.9,18.9,0,0,0,98.75,349H147a15,15,0,0,1,0,30H98.75a48.94,48.94,0,0,1-48.88-48.88V202.89A48.94,48.94,0,0,1,98.75,154h308.5a48.94,48.94,0,0,1,48.88,48.89V330.12A48.94,48.94,0,0,1,407.25,379Z"/><path d="M131,236a14.66,14.66,0,0,1-1.48-.07c-.48-.05-1-.13-1.45-.22s-1-.22-1.43-.36-.93-.31-1.38-.5-.89-.4-1.32-.63a12.45,12.45,0,0,1-1.27-.75c-.4-.27-.8-.56-1.18-.87s-.75-.65-1.1-1-.68-.72-1-1.1a14.34,14.34,0,0,1-.87-1.18q-.41-.62-.75-1.26c-.23-.43-.44-.88-.63-1.33s-.35-.92-.5-1.38-.26-1-.36-1.43-.17-1-.22-1.45a15.68,15.68,0,0,1,0-3c.05-.48.13-1,.22-1.45s.22-1,.36-1.43.31-.93.5-1.38.4-.9.63-1.33.48-.85.75-1.26a14.34,14.34,0,0,1,.87-1.18c.31-.38.65-.75,1-1.1s.72-.68,1.1-1,.78-.6,1.18-.87a12.45,12.45,0,0,1,1.27-.75q.65-.34,1.32-.63c.45-.19.92-.35,1.38-.5s1-.26,1.43-.36,1-.17,1.45-.22a16.15,16.15,0,0,1,2.95,0c.49.05,1,.13,1.46.22s1,.22,1.42.36.94.31,1.39.5.89.4,1.32.63a13.63,13.63,0,0,1,1.27.75c.4.27.8.56,1.18.87s.75.65,1.1,1,.67.72,1,1.1.6.78.87,1.18.52.83.75,1.26.44.88.63,1.33.35.92.5,1.38.26,1,.36,1.43.17,1,.22,1.45a15.68,15.68,0,0,1,0,3c-.05.48-.13,1-.22,1.45s-.22,1-.36,1.43-.31.93-.5,1.38-.4.9-.63,1.33-.48.85-.75,1.26-.57.8-.87,1.18-.65.75-1,1.1-.72.68-1.1,1-.78.6-1.18.87a13.63,13.63,0,0,1-1.27.75q-.65.34-1.32.63c-.45.19-.92.35-1.39.5s-.94.26-1.42.36-1,.17-1.46.22A14.46,14.46,0,0,1,131,236Z"/><path d="M175,236c-.49,0-1,0-1.48-.07s-1-.13-1.45-.22-1-.22-1.43-.36-.93-.31-1.38-.5-.9-.4-1.33-.63-.85-.48-1.26-.75a14.34,14.34,0,0,1-1.18-.87c-.38-.31-.75-.65-1.1-1s-.68-.72-1-1.1-.6-.78-.87-1.18a14.69,14.69,0,0,1-.76-1.27c-.22-.43-.43-.87-.62-1.32s-.35-.92-.5-1.38-.26-1-.36-1.43-.17-1-.22-1.45a15.68,15.68,0,0,1,0-3c.05-.48.13-1,.22-1.45s.22-1,.36-1.43.31-.93.5-1.38.4-.89.62-1.32a14.69,14.69,0,0,1,.76-1.27c.27-.4.56-.8.87-1.18s.65-.75,1-1.1.72-.68,1.1-1a14.34,14.34,0,0,1,1.18-.87q.62-.41,1.26-.75c.43-.23.88-.44,1.33-.63s.92-.35,1.38-.5,1-.26,1.43-.36,1-.17,1.45-.22a16.26,16.26,0,0,1,3,0c.48.05,1,.13,1.45.22s1,.22,1.43.36.93.31,1.38.5.89.4,1.32.63.86.48,1.27.75.8.56,1.18.87.75.65,1.1,1,.67.72,1,1.1.6.78.87,1.18a14.6,14.6,0,0,1,.75,1.27q.34.65.63,1.32c.19.45.35.92.5,1.38s.26,1,.36,1.43.17,1,.22,1.45a15.68,15.68,0,0,1,0,3c-.05.48-.13,1-.22,1.45s-.22,1-.36,1.43-.31.93-.5,1.38-.4.89-.63,1.32a14.6,14.6,0,0,1-.75,1.27c-.27.4-.57.8-.87,1.18s-.65.75-1,1.1-.72.68-1.1,1-.78.6-1.18.87-.84.52-1.27.75-.87.44-1.32.63-.92.35-1.38.5-1,.26-1.43.36-1,.17-1.45.22S175.49,236,175,236Z"/><path d="M312,344H194a15,15,0,0,1,0-30H312a15,15,0,0,1,0,30Z"/><path d="M312,397H194a15,15,0,0,1,0-30H312a15,15,0,0,1,0,30Z"/></g></svg>';
print.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M16.828 8.625H6.891a.703.703 0 0 1-.703-.703V2.953a.703.703 0 0 1 .703-.703h9.938a.703.703 0 0 1 .703.703v4.969a.703.703 0 0 1-.703.703M7.595 7.219h8.531V3.656H7.594Zm9.233 13.875H6.891a.703.703 0 0 1-.703-.703v-7.637a.703.703 0 0 1 .703-.703h9.938a.703.703 0 0 1 .703.703v7.637a.703.703 0 0 1-.703.703m-9.234-1.406h8.531v-6.231H7.594Z"/><path d="M19.09 17.766h-2.262a.703.703 0 0 1 0-1.406h2.262a.886.886 0 0 0 .885-.885V9.51a.886.886 0 0 0-.885-.885H4.629a.886.886 0 0 0-.885.885v5.964a.886.886 0 0 0 .885.885h2.262a.703.703 0 0 1 0 1.406H4.629a2.294 2.294 0 0 1-2.291-2.291V9.51a2.294 2.294 0 0 1 2.291-2.291H19.09a2.294 2.294 0 0 1 2.291 2.292v5.964a2.294 2.294 0 0 1-2.291 2.291"/><path d="m6.141 11.063-.069-.003a1 1 0 0 1-.135-.027l-.065-.023-.062-.03-.06-.035q-.029-.019-.055-.041a.7.7 0 0 1-.099-.099l-.041-.055q-.019-.029-.035-.059a1 1 0 0 1-.053-.127c-.007-.022-.012-.047-.017-.067s-.008-.047-.01-.068a1 1 0 0 1 0-.141 1 1 0 0 1 .027-.135l.023-.065q.013-.032.03-.062c.017-.03.022-.04.035-.059l.041-.055a1 1 0 0 1 .099-.099q.027-.022.055-.041l.06-.035q.03-.016.062-.03t.065-.023c.033-.01.047-.012.067-.017s.047-.008.068-.01a1 1 0 0 1 .138 0 .7.7 0 0 1 .135.027l.065.023.062.03.06.035q.029.019.055.041c.026.022.035.03.052.047s.031.034.047.052.028.037.041.055.024.039.035.059.021.041.03.062.016.043.023.065.012.047.017.067.008.047.01.068a1 1 0 0 1 0 .141 1 1 0 0 1-.027.135l-.023.065q-.013.032-.03.062c-.017.03-.022.04-.035.059a.8.8 0 0 1-.14.154q-.027.022-.055.041l-.06.035q-.03.016-.062.03t-.065.023c-.033.01-.044.012-.067.017s-.047.008-.068.01zm2.062 0q-.035 0-.069-.003c-.034-.003-.047-.006-.068-.01s-.047-.01-.067-.017l-.065-.023q-.032-.013-.062-.03c-.03-.017-.04-.022-.059-.035l-.055-.041a1 1 0 0 1-.099-.099q-.022-.027-.041-.055l-.036-.06-.029-.062q-.013-.032-.023-.065c-.01-.033-.012-.047-.017-.067s-.008-.047-.01-.068a1 1 0 0 1 0-.141 1 1 0 0 1 .027-.135l.023-.065q.013-.032.029-.062l.036-.06q.019-.029.041-.055a.7.7 0 0 1 .099-.099l.055-.041q.029-.019.059-.035a1 1 0 0 1 .127-.053c.022-.007.047-.012.067-.017s.047-.008.068-.01a1 1 0 0 1 .141 0 1 1 0 0 1 .135.027l.065.023q.032.013.062.03c.03.017.04.022.06.035s.038.026.055.041.035.03.052.047.031.034.047.052.028.037.041.055l.035.06q.016.03.03.062t.023.065c.01.033.012.047.017.067s.008.047.01.068a1 1 0 0 1 0 .141 1 1 0 0 1-.027.135l-.023.065-.03.062-.035.06a.8.8 0 0 1-.14.154q-.027.022-.055.041c-.028.019-.039.024-.06.035a1 1 0 0 1-.127.053c-.022.007-.047.012-.067.017a.5.5 0 0 1-.139.013m6.421 5.062H9.094a.703.703 0 0 1 0-1.406h5.531a.703.703 0 0 1 0 1.406m0 2.484H9.094a.703.703 0 0 1 0-1.406h5.531a.703.703 0 0 1 0 1.406"/></svg>';
print.title = 'Print snapshot';
print.className = 'print';
print.addEventListener('click', this.printSnapshot.bind(this));
Expand Down

0 comments on commit 408c9c1

Please sign in to comment.