Skip to content

Commit

Permalink
pretty files
Browse files Browse the repository at this point in the history
  • Loading branch information
Gaetanbrl committed Dec 4, 2023
1 parent 9740cd9 commit dadaa6b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions demo/addons/print/js/components/Legend.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@ export const Legend = () => {
// vector legend
let newId = detail.getAttribute("data-layerid");
let canvas = detail.querySelector(".vector-legend");
let canvasToImg = canvas.toDataURL("image/png").replace("image/png", "image/octet-stream");
legend = `<img class="mv-legend" id="legend-${ newId }" src="${ canvasToImg }" alt="Légende non disponible" onload="mviewer &amp;&amp;" onerror="this.onerror=null;this.src='img/nolegend.png';">`;
let canvasToImg = canvas
.toDataURL("image/png")
.replace("image/png", "image/octet-stream");
legend = `<img class="mv-legend" id="legend-${newId}" src="${canvasToImg}" alt="Légende non disponible" onload="mviewer &amp;&amp;" onerror="this.onerror=null;this.src='img/nolegend.png';">`;
}
return `
<div class="print-legend-img">
Expand Down

0 comments on commit dadaa6b

Please sign in to comment.