07-11-2020 17:45
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

07-11-2020 17:45
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Hi,
I'm trying to reuse a tumbler by defining it in a defs, but it seems that even a simple test is not working. For example:
<svg class="background">
<use id="container" href="#panoramaview">
<use id="item1" href="#panoramaview-item">
<g pointer-events="visible" id="abc">
<!--something here-->
</g>
</use>
<use id="item2" href="#panoramaview-item">
<g pointer-events="visible" id="xyc">
<use href = "#tpl1" />
</g>
</use>
<use id="pagination-dots" href="#pagination-widget" y="8">
<use href="#pagination-dot" />
<use href="#pagination-dot" />
<use href="#pagination-highlight-dot" />
</use>
</use>
<defs>
<g id = "tpl1">
<!--something else here-->
<g/>
</defs>
</svg>
I have tried adding the defs inside the id="container" but it didn't worked and also broke the panoramaview structure. Also, I tried using xlink:href, and it removes the invalid value but not the undefined attribute href. I tried the href without # (href = "tpl1"), same problem. Also, I tried using the <use href = "#tpl1" /> outside the container, but it still failing. Any suggestion? Thanks
07-11-2020 17:51
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

07-11-2020 17:51
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Forgot to mention that I also tried using the <use href = "#tpl1" /> in the container but outside id="item2":
...
<use id="item2" href="#panoramaview-item">
<g pointer-events="visible" id="xyc">
<!--something here-->
</g>
</use>
<use href = "#tpl1" />
<use id="pagination-dots" href="#pagination-widget" y="8">
<use href="#pagination-dot" />
<use href="#pagination-dot" />
<use href="#pagination-highlight-dot" />
</use>
</use>
...

07-11-2020 18:03
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

07-11-2020 18:03
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
I had typo when writing the post:
<defs>
<g id = "tpl1">
<!--something else here-->
</g>
</defs>
Fix the </g>. It was correct in the program. Still receiving the same error.

