2
我試圖通過流星來創建KineticJS對象的位置更新。通過流星更新KineticJS Canvas元素
看來,麻煩的是:
Players.update({name: "Rect"}, {xpos: this.attrs.x})
這裏是流星文檔說:
// Find the document with id "123", and completely replace it.
Users.update({_id: "123"}, {name: "Alice", friends: ["Bob"]});
我試圖檢查,看看是否數據正在通過更新:
console.log(Players.findOne({name: "Rect"}).xpos);
這是github:
https://github.com/randompast/randomtests/tree/master/meteorCanvasTest