diff --git a/wave/svg-edit.xml b/wave/svg-edit.xml
index 557a4fe4..1bd4b1af 100644
--- a/wave/svg-edit.xml
+++ b/wave/svg-edit.xml
@@ -187,10 +187,9 @@ SVG-edit Google Wave Gadget @ http://s
svgCanvas.each(function(e) {
// 'this' is the SVG DOM element node (ellipse, rect, etc)
// 'e' is an integer describing the position within the document
- var v = state.get(e.nodeId);
+ var v = state.get(this.nodeId);
if (v) {
var ob;
- var v = state.get(e.nodeId);
eval("ob=" + v); // FIXME: Yes, I'm using eval... Dirty, dirty..
if (ob) {
// FIXME: 'data' is a typo here, right? should be 'obj'?
@@ -201,7 +200,7 @@ SVG-edit Google Wave Gadget @ http://s
}
keys.remove(e.nodeId);
} else {
- e.parent().remove(e);
+ this.parentNode.removeChild(e);
}
});
@@ -215,8 +214,6 @@ SVG-edit Google Wave Gadget @ http://s
}
}
- // one major problem is that each client's SvgCanvas has its own copy of the obj_num
- // so the first object I draw will overwrite the first object you drew in our shared state
function sendDelta(svgCanvas, elem) {
if (!wave) return;
var delta = {};
@@ -232,6 +229,7 @@ SVG-edit Google Wave Gadget @ http://s
function main() {
svgCanvas = svg_edit_setup();
+ svgCanvas.setIdPrefix("svg_"+wave.getViewer().getId()+"_");
if (wave && wave.isInWaveContainer()) {
wave.setStateCallback(stateUpdated);
}