Merge branch 'main' of src.opensuse.org:adamm/autogits
This commit is contained in:
commit
571c47a83b
@ -17,19 +17,20 @@
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/">
|
||||
<script
|
||||
id="script2"><![CDATA[
|
||||
id="script2">
|
||||
console.log("script")
|
||||
window.addEventListener('load', (event) => {
|
||||
layerNo = 1
|
||||
maxLayer = 1
|
||||
|
||||
updateLayers = () => {
|
||||
for (i=0; i<svg.children.length; i++) {
|
||||
updateLayers = () => {
|
||||
for (i=0; i<svg.children.length; i++) {
|
||||
elem = svg.children[i]
|
||||
e = elem.attributes['inkscape:label']
|
||||
|
||||
if(e && e.value == 'Layer' + layerNo) {
|
||||
if(e && e.value == 'Layer' + layerNo) {
|
||||
elem.style = "display: inline;"
|
||||
} else if (e && e.value.startsWith('Layer') && !isNaN(Number(e.value.slice(5)))) {
|
||||
} else if (e && e.value.startsWith('Layer') && !isNaN(Number(e.value.slice(5)))) {
|
||||
elem.style = "display: none;"
|
||||
}
|
||||
}
|
||||
@ -37,9 +38,9 @@ window.addEventListener('load', (event) => {
|
||||
};
|
||||
|
||||
svg = document.getElementById("svg5");
|
||||
for (i=0; i<svg.children.length; i++) {
|
||||
for (i=0; i<svg.children.length; i++) {
|
||||
e=svg.children[i].attributes['inkscape:label']
|
||||
if (e && e.value.startsWith('Layer') && !isNaN(Number(e.value.slice(5))) && maxLayer < Number(e.value.slice(5))) {
|
||||
if (e && e.value.startsWith('Layer') && !isNaN(Number(e.value.slice(5))) && maxLayer < Number(e.value.slice(5))) {
|
||||
maxLayer = Number(e.value.slice(5))
|
||||
}
|
||||
}
|
||||
@ -47,7 +48,7 @@ window.addEventListener('load', (event) => {
|
||||
updateLayers()
|
||||
setInterval(updateLayers, 2000)
|
||||
})
|
||||
]]></script>
|
||||
</script>
|
||||
<sodipodi:namedview
|
||||
id="namedview7"
|
||||
pagecolor="#ffffff"
|
||||
|
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 36 KiB |
Loading…
Reference in New Issue
Block a user