From 2e4833de6db566f4ad6c8ed07a6705b390cb6b49 Mon Sep 17 00:00:00 2001 From: Alexis Deveria Date: Thu, 1 Oct 2009 17:45:49 +0000 Subject: [PATCH] Removed pointer-events style on serialization git-svn-id: http://svg-edit.googlecode.com/svn/trunk@749 eee81c28-f429-11dd-99c0-75d572ba1ddd --- editor/svgcanvas.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/editor/svgcanvas.js b/editor/svgcanvas.js index 88268b9c..f467c66e 100644 --- a/editor/svgcanvas.js +++ b/editor/svgcanvas.js @@ -882,6 +882,7 @@ function BatchCommand(text) { for (i=attrs.length-1; i>=0; i--) { attr = attrs.item(i); if (attr.nodeValue != "") { + if(attr.nodeValue.indexOf('pointer-events') == 0) continue; out.push(" "); // map various namespaces to our fixed namespace prefixes // TODO: put this into a map and do a look-up instead of if-else @@ -1947,7 +1948,6 @@ function BatchCommand(text) { // if we are dragging a point, let's move it if (current_poly_pt_drag != -1 && current_poly) { var i = current_poly_pt_drag * 2; - var old_poly_pts = $.map(current_poly_pts, function(n){return n/current_zoom;}); // if the image is rotated, then we must modify the x,y mouse coordinates @@ -1980,7 +1980,8 @@ function BatchCommand(text) { var next_y = getPolyPoint(index+1)[1]; var item = current_poly.pathSegList.getItem(index); - var next_index = index+1 >= (current_poly_pts/2).length ? 0 : index+1; + var next_index = index+1; // This currently only works for closed paths + var next_item = current_poly.pathSegList.getItem(next_index); var x_diff = x - old_poly_pts[index*2]; var y_diff = y - old_poly_pts[index*2 + 1];