mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 01:41:22 +01:00
annotate template strings for syntax hightlight and format
This commit is contained in:
parent
5a35f0d320
commit
1573fad58d
35 changed files with 816 additions and 460 deletions
|
|
@ -1,7 +1,5 @@
|
|||
// fill-box cannot use Shadow DOM as it needs access to svg hatches
|
||||
// append stylesheet
|
||||
{
|
||||
const style = `
|
||||
const style = /* css */ `
|
||||
fill-box:not([disabled]) {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
|
@ -14,7 +12,8 @@
|
|||
fill-box > svg > rect {
|
||||
stroke: #666666;
|
||||
stroke-width: 2;
|
||||
}`;
|
||||
}
|
||||
`;
|
||||
|
||||
const styleElement = document.createElement("style");
|
||||
styleElement.setAttribute("type", "text/css");
|
||||
|
|
@ -24,7 +23,7 @@
|
|||
|
||||
{
|
||||
const template = document.createElement("template");
|
||||
template.innerHTML = `
|
||||
template.innerHTML = /* html */ `
|
||||
<svg>
|
||||
<rect x="0" y="0" width="100%" height="100%">
|
||||
</svg>
|
||||
|
|
@ -70,5 +69,6 @@
|
|||
}
|
||||
}
|
||||
|
||||
// cannot use Shadow DOM here as need an access to svg hatches
|
||||
customElements.define("fill-box", FillBox);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue