javascript - is it possible to rescale a snap svg canvas? -


i have snap svg canvas area sits on top of dynamically loaded image , covers entirely. image , svg area extend off right side of screen. desirable. @ 1 point in application i'd use jquery or javascript temporarily shrink image , svg area down proportionally fits visible screen area.

is possible? if how might done?

here's setup

<div id="holder" style="align:center; width: <%=stagew%>px; height: <%=stageh%>px;" >    <img src="<%=img%>" class="image"  id="img" width="<%=stagew%>" height="<%=stageh%>"/>    <svg id="svg"></svg> </div> 

the stageh , stagew variables classic asp , dimensions of jpg. svg area takes on same size , filled user-drawn shapes traced on top of image.

i'd find way reduce image , svg contents proportianately fit within window's width.


Comments

Popular posts from this blog

html - Firefox flex bug applied to buttons? -

html - Missing border-right in select on Firefox -

c# - two queries in same method -