I'm struggling with fitting a 640X480 svg inside the following div within the body section of my HTML.
<div style="width:320px; height:480px;">
<svg id="svg1"></svg>
</div>
After attempting to adjust the size using Snap, the svg is unfortunately being cropped from the right side. Here is what I've tried:
var paper=Snap("#svg1");
Snap.load("somesvg.svg",function(f){
paper.append(f);
});
paper.attr({
width:320, height:480
})