Handling | Sololearn: Learn to code for FREE!

0

Handling

https://code.sololearn.com/W1UN1087jca6/?ref=app There are no rect svg elements. Why this behavior?

js

3/2/2021 4:20:34 PM

Ivan Zanoth

1 Answer

New Answer

0

When I run your linked code, it shows a big black rectangle. I assume you want to know why a big black rectangle appears when there are no SVG rect elements. The big black rectangle is caused by your big black ellipse added by your JavaScript. You set fill to "null" which is drawn as black. The ellipse is bigger than the rectangle for displaying your SVG so the entire area gets coloured black. When I inspected the ellipse, here were the properties: <ellipse id="cir" stroke-width="2" stroke="#000000" cy="500" fill="null" cx="200" ry="88901.05737278944" rx="88901.05737278944"></ellipse> Notice that your radius x and y(rx, ry) values are roughly 80 times larger than the average screen resolution which is far off the screen in all directions.