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