Setup participant's canvas ID upon the participant callback

git-svn-id: http://svg-edit.googlecode.com/svn/trunk@119 eee81c28-f429-11dd-99c0-75d572ba1ddd
master
Jeff Schiller 2009-06-12 12:33:22 +00:00
parent a9b4731df6
commit 184d44f984
1 changed files with 5 additions and 1 deletions

View File

@ -225,12 +225,16 @@ SVG-edit Google Wave Gadget @ <a href="http://svg-edit.googlecode.com/" target="
delta[elem.id] = wave.util.printJson(ob, false);
wave.getState().submitDelta(delta);
}
function setupId() {
svgCanvas.setIdPrefix("svg_"+wave.getViewer().getId()+"_");
}
function main() {
svgCanvas = svg_edit_setup();
svgCanvas.setIdPrefix("svg_"+wave.getViewer().getId()+"_");
if (wave && wave.isInWaveContainer()) {
wave.setStateCallback(stateUpdated);
wave.setParticipantCallback(setupId);
}
svgCanvas.bind("changed", sendDelta);
svgCanvas.bind("cleared", stateUpdated);