1
0
mirror of synced 2025-12-19 17:48:10 -05:00

tags.html: fix copy family

This commit is contained in:
Marc Foley
2025-06-12 09:46:51 +01:00
parent 18d9a93a92
commit 5c2a7028c8

View File

@@ -678,15 +678,15 @@ function axesCombos(axes) {
},
copyFamily() {
this.isEdited = true;
let fromTags = this.tags.filter(family => family.name === this.fromFamily.name);
let fromTags = this.tags.filter(family => family.name === this.fromFamily);
if (fromTags.length === 0) {
alert(`No tags found for Family "${this.toFamily}"`);
return;
}
fromTags.forEach((tag) => {
let newTag = {Family: this.toFamily, "Group/Tag": tag["Group/Tag"], Weight: tag.Weight};
let newTag = new FontTag(this.toFamily, tag.category, tag.score);
this.tags.push(newTag);
this.history.push(`+ ${newTag.Family},${newTag["Group/Tag"]},${newTag.Weight}`);
this.history.push(`+ ${newTag.name},${newTag.category},${newTag.score}`);
})
this.saveSession();
},