bumbu/svg-pan-zoom

<use [...] /> is cut off

Open

#52 建立於 2014年7月24日

在 GitHub 查看
 (11 留言) (0 反應) (0 負責人)JavaScript (1,585 star) (383 fork)batch import
bughelp wanted

描述

When I use symbols and uses to decrease the size of an svg because I use the same element multiple times I get some issues with svg-pan-zoom:

<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/2000/svg">
<defs>
  <symbol id="my_id">
    <circle r="10" />
  </symbol>
</defs>
<g>
  <use xlink:href="#my_id"/>
</g>
<g transform="scale(1.5)">
  <use xlink:href="#my_id" x="2000" y="1000" />
</g>

When I use this svg on a screen that has not a height of 100px and a width of 2000px the second element is not visible. In my actual project I have paths that are displayed until the screen ends, but when I pan the svg up the path is cut off.

貢獻者指南