I have the next code:
<html>
<head>
<title>example00</title>
</head>
<body>
aaaaaaaaaaaa
<div data-id="95" id="map">
<style type="text/css">
svg {
margin: 0;
}
g {
margin: 0;
}
</style>
<svg height="500px" width="100%" pointer-events="all" style="border: 2px solid red;" xmlns="http://www.w3.org/2000/svg">
<g class="viewport" transform="translate(-1134.8008037565835,-465.99275413153373)scale(2.7132086548953445)">
<g transform="translate(722.22 125)"><circle id="node_1" class="node" style="fill: rgb(50, 50, 128);" r="6"/></g>
<g transform="translate(572.22 158.33)"><circle id="node_2" class="node" style="fill: rgb(50, 50, 128);" r="6"/></g>
<g transform="translate(805.56 208.33)"><circle id="node_10" class="node" style="fill: rgb(50, 50, 128);" r="6"/></g>
<g transform="translate(722.22 241.67)"><circle id="node_11" class="node" style="fill: rgb(50, 50, 128);" r="6"/></g>
<g transform="translate(838.89 225)"><circle id="node_12" class="node" style="fill: rgb(50, 50, 128);" r="6"/></g>
</g>
</svg>
</div>
</body>
</html>
I think that the svg groups has not margins and align.
And the group elements in for example Chromium (fork Chrome) is shown good in the inspector, as you see in the screenshot:
But the firefox is shown with margins and a align a few to the right, as you see in the screenshot:
is it a bug? or is it something that I miss it in the code?
It is a bug. I found a small example to test:
The problem is the border changes the positions of
<g>
.These are the screenshots with the bug in firefox:
And this is the screenshot in chromium (and it runs fine):