mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 09:41:24 +01:00
Update script.js
fix use elements sizing
This commit is contained in:
parent
168cb3cdab
commit
1087930e11
1 changed files with 7 additions and 2 deletions
|
|
@ -6643,11 +6643,16 @@ function fantasyMap() {
|
|||
}
|
||||
|
||||
// to fix use elements sizing
|
||||
clone.selectAll("use").each(function() {
|
||||
clone.select("#icons").selectAll("use").each(function() {
|
||||
const size = this.parentNode.getAttribute("size") || 1;
|
||||
this.setAttribute("width", size + "px");
|
||||
this.setAttribute("height", size + "px");
|
||||
});
|
||||
clone.select("#terrain").selectAll("use").each(function() {
|
||||
const size = this.getAttribute("width") || 1;
|
||||
this.setAttribute("width", size + "px");
|
||||
this.setAttribute("height", size + "px");
|
||||
});
|
||||
|
||||
// clean attributes
|
||||
//clone.selectAll("*").each(function() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue