cropping svg

master
Matt Huntington 9 years ago
parent f2a028e115
commit c0addcccc4

@ -2,7 +2,9 @@ svg {
margin:40px; /* give it some margin to show off the axes */ margin:40px; /* give it some margin to show off the axes */
overflow:visible; /* axes will extend beyond the svg cropping area. Show them anyway */ overflow:visible; /* axes will extend beyond the svg cropping area. Show them anyway */
} }
#container {
overflow: hidden;
}
svg circle { svg circle {
r:5; /* circles will have a default radius of 5 px */ r:5; /* circles will have a default radius of 5 px */
transition: r 0.5s ease-in-out, fill 0.5s linear; /* create transitions for radius and fill */ transition: r 0.5s ease-in-out, fill 0.5s linear; /* create transitions for radius and fill */

@ -14,8 +14,10 @@
<% if(currentUser) { %> <% if(currentUser) { %>
<!-- show app if user is logged in --> <!-- show app if user is logged in -->
<svg> <svg>
<svg id="container">
<g id="points"></g> <g id="points"></g>
</svg> </svg>
</svg>
<form action="/logins?_method=DELETE" method="POST"> <form action="/logins?_method=DELETE" method="POST">
<!-- log out button --> <!-- log out button -->
<input type="submit" value="Log Out"/> <input type="submit" value="Log Out"/>

Loading…
Cancel
Save