You develop an interactive scalable vector graphic (SVG) application.
You write the following code (Line numbers are included for reference only.):
You need to increase the size of the circle by 50 percent.
Which code segment should you insert at line 02?
A.
Option A
B.
Option B
C.
Option C
D.
Option D
The answer is C
http://tutorials.jenkov.com/svg/scripting.html
?
C is also technically wrong, the 1.5 should be of data type string
It does look like is B
The correct answer is B!
B would change the size of the svg, but not the circle. C would change the size of the circle.
The answer is C.
The answer is B.
Yes, the question could be clearer. The question is about “zoom”-ing the SVG.
Zooming/scaling works with
For other elements you can use transform: scale(1.5) http://www.w3schools.com/cssref/css3_pr_transform.asp
The only correct answer is B. C is INCORRECT. The currentScale attribute belongs to the SVG element, only. Applying the currentScale attribute to a circle element has no effect on the scale of the circle. I verified this in IE.
Plunker proving B to be correct in IE:
http://plnkr.co/edit/UrRhi29rcNE7Yg9kqtab?p=preview
For some reason it doesn’t work in Chrome for me. Weird.
https://jsfiddle.net/6z4j0Lxt/
Seems like correct answer is B
See the remarks:
https://msdn.microsoft.com/en-us/library/ff971930%28v=vs.85%29.aspx?f=255&MSPPError=-2147217396
Answer is B : it works only with IE , tested with IE 9, 10
tested with Chrome : and it does not work.
for other browser use : transform=”scale(1.5)”
you’re right.
For other browsers the equivalent answer is:
myGraphic.currentScale = 1.5;
in the current situation the current answer is B i already check it but you have to try it under IE :
https://jsfiddle.net/q2buo2x7/
function zoom() {
var outer = document.getElementById(‘outer’);
outer.setAttribute(“currentScale”, 1.5);
}
zoom();
for other browser i think we have to use “transform” which work in inner circle :
function zoom() {
var circle = document.getElementById(‘inner’);
inner.setAttribute(“transform”, “scale(1.5)”);
}
zoom();