Make changing resolution undo/redo-able

git-svn-id: http://svg-edit.googlecode.com/svn/trunk@202 eee81c28-f429-11dd-99c0-75d572ba1ddd
This commit is contained in:
Jeff Schiller
2009-06-26 14:31:03 +00:00
parent ecb0f0e74e
commit cfa488a502
2 changed files with 18 additions and 6 deletions

View File

@@ -1,5 +1,3 @@
var svgcanvas = null;
if(!window.console) {
window.console = new function() {
this.log = function(str) {};
@@ -905,8 +903,12 @@ function SvgCanvas(c)
}
this.setResolution = function(x, y) {
var w = svgroot.getAttribute("width"),
h = svgroot.getAttribute("height");
svgroot.setAttribute("width", x);
svgroot.setAttribute("height", y);
addCommandToHistory(new ChangeElementCommand(svgroot, {"width":w,"height":h}, "resolution"));
call("changed", svgroot);
}
this.getMode = function() {