EasyPZ Example with Auto Transform on a Class
HTML
<script src="https://unpkg.com/easypz@latest/easypz.js"></script>
<svg easypz='{"applyTransformTo": ".transform"}'>
<text x="100" y="20">Static Text</text>
<circle class="transform" cx="140" cy="70" r="25" fill="#f00"></circle>
<text class="transform" x="140" y="70">Drag</text>
<text class="transform" x="140" y="88">Me!</text>
<circle cx="200" cy="70" r="25"></circle>
<text x="200" y="70">No</text>
<text x="200" y="88">Drag!</text>
</svg>
CSS
body {
overflow: hidden;
background: transparent;
}
svg * {
-webkit-user-select: none; /* Safari 3.1+ */
-moz-user-select: none; /* Firefox 2+ */
-ms-user-select: none; /* IE 10+ */
user-select: none; /* Standard syntax */
}
svg {
width: 400px;
height: 400px;
}
svg text {
fill: #fff;
font-family: "DejaVu Serif";
text-anchor: middle;
}