Skip to content

Commit

Permalink
fix missing rotation from media frag changes
Browse files Browse the repository at this point in the history
  • Loading branch information
kepper committed Dec 11, 2023
1 parent f104723 commit 15d9bef
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/store/data/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down Expand Up @@ -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
}
Expand Down Expand Up @@ -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
}
Expand Down Expand Up @@ -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
}
Expand Down

0 comments on commit 15d9bef

Please sign in to comment.