From 1ce26ed704f3e9699868810a56a5644c8ced2d3c Mon Sep 17 00:00:00 2001 From: azivner Date: Tue, 13 Nov 2018 19:16:21 +0100 Subject: [PATCH] fix dirtying transform saved status by properly cloning transform object --- src/public/javascripts/services/note_detail_relation_map.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/public/javascripts/services/note_detail_relation_map.js b/src/public/javascripts/services/note_detail_relation_map.js index d7bade9ad..d077c2d61 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(); }