From bab550bc73a906e838f0ea1eecc3ded7d0ec42eb Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Tue, 21 Mar 2023 16:58:36 +0100 Subject: [PATCH] wip #5817 @2 --- resources/linkeditor/js/linkeditor.links.js | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/resources/linkeditor/js/linkeditor.links.js b/resources/linkeditor/js/linkeditor.links.js index 6b1f99cb2..fa58c1dd4 100644 --- a/resources/linkeditor/js/linkeditor.links.js +++ b/resources/linkeditor/js/linkeditor.links.js @@ -754,18 +754,22 @@ LinkeditorLinks.prototype = { if ($('#linkeditor-links [fb-uid="' + uid + '"]').length > 0) { return; } - if (!$this.linkeditor.single && page % 2 === 1 && link.page % 2 === 0 && link.left > $this.linkeditor.pw) { - link.page++; - link.left -= $this.linkeditor.pw; - } - if (side === 'right') { - link.page--; - link.left = parseInt(link.left) + $this.linkeditor.pw; + link.left = parseFloat(link.left) + if (!$this.linkeditor.single) { + if (page % 2 === 1 && link.page % 2 === 0 && link.left > $this.linkeditor.pw) { + link.page++; + link.left -= $this.linkeditor.pw; + } + if (side === 'right' && link.page % 2 === 1) { + link.page--; + link.left += $this.linkeditor.pw; + } } + if (link.page != page) { return; } - + console.log(link); $this.addLink(link, false); }); this.updateLayers(); -- 2.39.5