From 15d9bef97b73c2868d775e2cecb22424e7cae07c Mon Sep 17 00:00:00 2001 From: Johannes Kepper Date: Mon, 11 Dec 2023 09:52:51 +0100 Subject: [PATCH] fix missing rotation from media frag changes --- src/store/data/index.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/store/data/index.js b/src/store/data/index.js index d2bfecc..e495d38 100644 --- a/src/store/data/index.js +++ b/src/store/data/index.js @@ -794,11 +794,12 @@ const dataModule = { let rotate = '&rotate=0' let fragment = existingTarget.split('#xywh')[1] + const existingRotate = fragment.split('rotate=')[1] + if (fragment !== undefined) { const xywh = fragment.split('&rotate=')[0] fragment = '#xywh=' + x + ',' + xywh.split(',')[1] + ',' + xywh.split(',')[2] + ',' + xywh.split(',')[3] - const existingRotate = fragment.split('&rotate=')[1] if (existingRotate !== undefined) { rotate = '&rotate=' + existingRotate } @@ -847,11 +848,12 @@ const dataModule = { let rotate = '&rotate=0' let fragment = existingTarget.split('#xywh=')[1] + const existingRotate = fragment.split('rotate=')[1] + if (fragment !== undefined) { const xywh = fragment.split('&rotate=')[0] fragment = '#xywh=' + xywh.split(',')[0] + ',' + y + ',' + xywh.split(',')[2] + ',' + xywh.split(',')[3] - const existingRotate = fragment.split('&rotate=')[1] if (existingRotate !== undefined) { rotate = '&rotate=' + existingRotate } @@ -901,11 +903,12 @@ const dataModule = { let rotate = '&rotate=0' let fragment = existingTarget.split('#xywh=')[1] + const existingRotate = fragment.split('rotate=')[1] + if (fragment !== undefined) { const xywh = fragment.split('&rotate=')[0] fragment = '#xywh=' + xywh.split(',')[0] + ',' + xywh.split(',')[1] + ',' + w + ',' + xywh.split(',')[3] - const existingRotate = fragment.split('&rotate=')[1] if (existingRotate !== undefined) { rotate = '&rotate=' + existingRotate } @@ -954,11 +957,12 @@ const dataModule = { let rotate = '&rotate=0' let fragment = existingTarget.split('#xywh=')[1] + const existingRotate = fragment.split('rotate=')[1] + if (fragment !== undefined) { const xywh = fragment.split('&rotate=')[0] fragment = '#xywh=' + xywh.split(',')[0] + ',' + xywh.split(',')[1] + ',' + xywh.split(',')[2] + ',' + h - const existingRotate = fragment.split('&rotate=')[1] if (existingRotate !== undefined) { rotate = '&rotate=' + existingRotate }