Fixed: Inserting properties to the tree now animate correctly to the inserted property
This commit is contained in:
@@ -18,7 +18,7 @@ const insertProperty = new ValidatedMethod({
|
||||
run({creatureProperty}) {
|
||||
let rootCreature = getRootCreatureAncestor(creatureProperty);
|
||||
assertEditPermission(rootCreature, this.userId);
|
||||
insertPropertyWork({
|
||||
return insertPropertyWork({
|
||||
property: creatureProperty,
|
||||
creature: rootCreature,
|
||||
});
|
||||
|
||||
@@ -205,8 +205,8 @@
|
||||
creatureProperty.parent = {collection: 'creatures', id: that.creatureId};
|
||||
creatureProperty.ancestors = [ {collection: 'creatures', id: that.creatureId}];
|
||||
setDocToLastOrder({collection: CreatureProperties, doc: creatureProperty});
|
||||
let creaturePropertyId = insertProperty.call({creatureProperty});
|
||||
return creaturePropertyId;
|
||||
let id = insertProperty.call({creatureProperty});
|
||||
return `tree-node-${id}`;
|
||||
}
|
||||
});
|
||||
},
|
||||
@@ -217,10 +217,11 @@
|
||||
elementId: 'insert-creature-property-fab',
|
||||
callback(libraryNode){
|
||||
if (!libraryNode) return;
|
||||
insertPropertyFromLibraryNode.call({
|
||||
let id = insertPropertyFromLibraryNode.call({
|
||||
nodeId: libraryNode._id,
|
||||
parentRef: {collection: 'creatures', id: that.creatureId},
|
||||
});
|
||||
return `tree-node-${id}`;
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user