Incorporating the SVG.js library into my project, I am currently faced with a challenge. Specifically, I am attempting to shift a group that consists of multiple elements such as rect
, text
, and one use
element in the x-direction:
// creating a symbol; this symbol can take any form
const symbol = svg.symbol().circle(10)
//creating a group with various elements
const group = svg.group();
const rect = group.rect();
const text = group.plain('some text');
const symbolUse = svg.use(symbol);
group.add(symbolUse);
//at a later point...translate the group to a new x-coordinate (can be anything)
group.x(newX)
Currently, I have successfully managed to move all elements in the group in the desired manner along the x-axis except for the use element. Interestingly, the use element seems to shift not only horizontally but also vertically, which is unintended.
I wonder if this issue arises from a bug within the SVG.js library or if it could potentially be due to a misunderstanding on my part when handling the use element?