Made zoom center on image
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@621 eee81c28-f429-11dd-99c0-75d572ba1dddmaster
parent
dad7b7f98b
commit
d514c9d9c6
|
@ -941,6 +941,11 @@ function svg_edit_setup() {
|
|||
|
||||
function setResolution(w, h) {
|
||||
$('#svgcanvas').css( { 'width': w, 'height': h } );
|
||||
var w_area = $('#workarea');
|
||||
var scroll_y = h/2 - w_area.height()/2;
|
||||
var scroll_x = w/2 - w_area.width()/2;
|
||||
w_area[0].scrollTop = scroll_y;
|
||||
w_area[0].scrollLeft = scroll_x;
|
||||
}
|
||||
|
||||
$('#resolution').change(function(){
|
||||
|
|
Loading…
Reference in New Issue