如何重命名function vector2(x, y) {
this.x = x;
this.y = y;
this.add = function (vect, multiplier){
this.x = this.x + (vect.x * multiplier);
this.y = this.y + (vect.y * multiplier);
return this; // <----
this.sub = function (vect, multiplier){
this.x = this.x - (vect.x * multiplier);
this.y = this.y - (vect.y * multiplier);
return this; // <----
};
}
节点?
答案 0 :(得分:1)
没有用于重命名节点的API。您必须获取节点的值,使用新名称将其保存到数据库并删除旧节点。