Sending state now works. Still some bugs in handling the state updates
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@82 eee81c28-f429-11dd-99c0-75d572ba1dddmaster
parent
6fda1f7d99
commit
cd86b6520c
|
@ -138,8 +138,10 @@
|
|||
function stateUpdated() {
|
||||
var state = wave.getState();
|
||||
var keys = state.getKeys();
|
||||
document.canvas.each(function(e) {
|
||||
if (e) {
|
||||
canvas.each(function(e) {
|
||||
//alert(e);
|
||||
var v = state.get(e.nodeId);
|
||||
if (v) {
|
||||
var ob;
|
||||
var v = state.get(e.nodeId);
|
||||
eval("ob="+v); // FIXME: Yes, I'm using eval... Dirty, dirty..
|
||||
|
@ -157,14 +159,14 @@
|
|||
// New nodes
|
||||
for (var k in keys) {
|
||||
var ob;
|
||||
var v = state.get(e.nodeId);
|
||||
var v = state.get(k);
|
||||
eval("ob="+v); // FIXME: Yes, I'm using eval... Dirty, dirty..
|
||||
if (ob) canvas.updateElementFromJson(data)
|
||||
}
|
||||
}
|
||||
|
||||
function sendDelta(canvas, elem) {
|
||||
if (wave) return;
|
||||
if (!wave) return;
|
||||
var delta = {};
|
||||
var attrs = {};
|
||||
var a = elem.attributes;
|
||||
|
|
Loading…
Reference in New Issue