Skip to main content

All Questions

1 vote
1 answer
35 views

How to I apply the zoom transform to my d3 force directed graph?

Other similar answers I have found on StackOverflow are old and no longer apply to the latest version. My zoomed function is being called. The transform parameter contains: I assume I will need to ...
0 votes
0 answers
85 views

Determining visible center of SVG as rotation origin while panning and zooming

I'm developing an SVG viewer, using svg-pan-zoom library to pan and zoom the SVG. What I want What I want in the end is to be able to pan/zoom to a specific point in the SVG and be able to rotate from ...
0 votes
0 answers
55 views

SVG make a clip-path to scale and relocate as its container scales

I have this svg: <svg viewBox="0 0 280 280" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <defs> <clipPath id="clipPath"> <path d="...
2 votes
1 answer
882 views

How to get current values from attribute "d" of SVG path when transform property is applied (pure JavaScript)?

I am creating a mini SVG editor, I am doing it with pure JavaScript and I would like to generate a clean SVG, therefore, is there a formula, pattern, logic, algorithm, etc., to obtain the current ...
0 votes
2 answers
1k views

How do i toggle rotation on svg images in Bootstrap 4 Accordion card on click?

I have a svg arrow image within each header of my Bootstrap 4 accordion card. I want the header I open's arrow to rotate 180 degrees while it is open and to toggle back to it's initial state if I ...
-1 votes
1 answer
452 views

Copy transformation from an SVG element to a SVG group

I have an SVG element and need to draw transform points around. I'm using svg.js and part of its resize plug-in. It works for moving and rotating an un-transformed element, but not for an element ...
-1 votes
1 answer
48 views

Why transforms shift the whole cordinate system instead just moving the element in SVG?

I have seen transforming the graphic in SVG don't affect the object to be transformed but transform the whole coordinate system and then draw the element in that system. What does this help to ...
0 votes
1 answer
63 views

weird rendering of / event handling on transformed svg children in Firefox

So, I have an SVG overlay which has a polygon drag handles for resizing a box around areas of a scalable image. In Chrome, everything is working swimmingly, but in Firefox is all falls apart in ways ...