Skip to content

Build your personal knowledge base with Trilium Notes

fix dirtying transform saved status by properly cloning transform object

azivner1ce26ed704f3
diff --git a/src/public/javascripts/services/note_detail_relation_map.js b/src/public/javascripts/services/note_detail_relation_map.js
index d7bade9ad8..d077c2d616 100644
--- a/src/public/javascripts/services/note_detail_relation_map.js
+++ b/src/public/javascripts/services/note_detail_relation_map.js
@@ -209,7 +209,8 @@ function saveCurrentTransform() {
const newTransform = pzInstance.getTransform();
if (JSON.stringify(newTransform) !== JSON.stringify(mapData.transform)) {
- mapData.transform = newTransform;
+ // clone transform object
+ mapData.transform = JSON.parse(JSON.stringify(newTransform));
saveData();
}