Closed prog-r-amer closed 5 years ago
As I remember, SVG with large sizes will be overlayed on frames (from comment-plugin)
It seems that this is a bug with SVG, since the hover zone does not correspond to the actual size of the SVG
It goes a bit outside of the size of the svg, but it always works when the svg is bigger than the path. I would still appreciate an option to make the svg size bigger, since I don't use the comment plugin myself.
You were right, even if I set the svg size to the same size as the node editor hover doesn't always work. Do you have any suggestions how I get the hover to work 100% of the time?
I don't. Seems like a bug in SVG, since I have not found a logical explanation for this behavior. Moreover, if the SVG size is too small, the coordinates of a connections may offset. This happens on all WebKit browsers.
I will be grateful if someone finds examples with the reproduction of such behavior on a regular SVG (outside the framework)
I don't believe it's a bug in svg, I only get it within rete. Could it be something with drag or onclick events not propagating correctly and because of that the element doesn't get the mouseover event?
@prog-r-amer I have reproduced the bug: https://codepen.io/Ni55aN/pen/jJGVYe
Anyway, starting from rete-connetion-plugin@0.5.0-rc.1 it was fixed
wow, thanks mate. I only have 1 issue now after upgrading: without
.connection {width: auto; height: auto}
it looks like this: https://imgur.com/a/mkHsqgY
I don't get the hover bug anymore though and this css fixes it for me. Just wanted to report it.
Ok, very rarely I still manage to not get hover working right, but it's far better than before.
Maybe you have an inherited styles?
By the way, with
pointer-events: all;
your codepen works bugfree for both paths.
No, it's with the 1px width and height, that it doesn't work.
On my mobile phone it looks the same as the example I sent you. On my desktop pc it works.
What is your mobile OS and browser?
Android with Chrome
It's strange. I don't have any issues on Android 7.0 with Chrome 72
For Reference: https://imgur.com/a/3zuY7Bx
Chrome Version is 72 too.
Why do you set the width and height for the svg? It sets the ratio of the svg, and I think this is what causes the bug in some browsers.
I think you should set the width and height of the absolute positioned container, and give the svg no width and height attributes. This might also solve the still sometimes occuring hover bug, if you set the container to the actual dimensions of the svg, although I am not sure about that.
Why do you set the width and height for the svg?
in some cases SVG may overlap other elements
I think you should set the width and height of the absolute positioned container, and give the svg no width and height attributes.
This doesn't work. SVG will still overlap
Why is it not allowed to overlap? And in the Image you posted the width and height are still 1px.
Why is it not allowed to overlap?
it will blocks a mouse events
And in the Image you posted the width and height are still 1px.
with of div, not SVG
You can control the mouse events with pointer-events property of elements.
pointer-events none doesn't working with root SVG
Today I learned...
I also have the bug on my desktop. The svg element bounding box is fine but the coordinates are wrong due to scaling factor of the HDPI display 150%.
On the other hand the 3D car configurator example works
I can not give an explanation for this, since it looks like a bug at the level of the webkit engine
The temporary solution is adding width: auto;
height: auto
to SVG, but it may lead to overlaying of other elements
The same issue on Win10 with an interface scale of 125% (the browser has 100%)
I deleted width and height constraints on SVG (which leads to a strange problem with a scaling)
I hope that position: absolute
and pointer-events: none
will solve the issue of clicking on comment/frame in all major browsers
rete-connection-plugin@0.6.4 published https://github.com/retejs/connection-plugin/commit/39c55569fcefeedf134aa7e2017908c0a14d2d62
The most interesting thing is that pointer-events
does not work without position: absolute
Hi,
I have an issue with giving the connections hover elements, because of the bounding box of the svg.
.main-path:hover { stroke: green !important; }
This doesn't work everywhere. If I give svg an absolute size like 10000px it works in a bigger area, but not when you translate the area. Can you give the svg the width and height properties according do the path inside it, so hover / onclick works everywhere?