]> _ Git - fluidbook-toolbox.git/commitdiff
Revert "wip #6543"
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 8 Dec 2023 08:36:04 +0000 (09:36 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 8 Dec 2023 08:36:35 +0000 (09:36 +0100)
This reverts commit f65cc86b9c6747a92c350bdb14c4e1e43592ef11.

resources/linkeditor/js/linkeditor.js
resources/linkeditor/js/linkeditor.links.js
resources/linkeditor/js/linkeditor.utils.js

index 7f9ccd3040f755be8098ebb68b0c079cfd65c702..7ebf4d89c4e5090f242698b3d946bf20d8caeb30 100644 (file)
@@ -30,6 +30,7 @@ window.tippy = tippy;
 window.Noty = Noty;
 window.GrahamScan = GrahamScan;
 
+
 window.key.filter = function (event) {
     let tagName = (event.target || event.srcElement).tagName;
     //let field=tagName == 'INPUT' || tagName == 'SELECT' || tagName == 'TEXTAREA';
@@ -62,7 +63,6 @@ $.ajaxSetup({
 function LinkEditor() {
     this.mobileFirst = FLUIDBOOK_DATA.settings.mobileNavigationType === 'mobilefirst';
     this.single = ['mobilefirst', 'portrait'].indexOf(FLUIDBOOK_DATA.settings.mobileNavigationType) >= 0 || FLUIDBOOK_DATA.settings.pages <= 1;
-    this.rtl = FLUIDBOOK_DATA.id==30547 && !this.single && ['ar', 'he', 'fa', 'ku', 'pa', 'sd', 'ur'].indexOf(FLUIDBOOK_DATA.locale) >= 0;
 
     this.pw = FLUIDBOOK_DATA.settings.width;
     this.ph = FLUIDBOOK_DATA.settings.height;
@@ -85,6 +85,7 @@ function LinkEditor() {
 
     this.dimensionProperties = ['left', 'top', 'width', 'height'];
 
+
     this.init();
 }
 
@@ -458,9 +459,9 @@ LinkEditor.prototype = {
 
         window.location.hash = '#' + this.currentPage;
         this.clearLinksAndRulers();
-        this.loader.loadPage(this.currentPage, this.rtl ? 'right' : 'left');
+        this.loader.loadPage(this.currentPage, 'left');
         if (!this.single && !isSpecial) {
-            this.loader.loadPage(this.currentPage + 1, this.rtl ? 'left' : 'right');
+            this.loader.loadPage(this.currentPage + 1, 'right');
         }
         $("#linkeditor-page-field input").val(this.currentNumericPage);
         this.resize.resize();
@@ -559,8 +560,10 @@ LinkEditor.prototype = {
     getCurrentPage: function () {
         return this.currentPage;
     },
+
 }
 
+
 $(function () {
     window.linkeditor = new LinkEditor();
 });
index e95f51fb071843d1333eb1d566f3b6257d87b068..ca609b6db79cb3eb5d9d019b291897aacd8bbb4a 100644 (file)
@@ -864,13 +864,11 @@ LinkeditorLinks.prototype = {
     },
 
     normalizeLinksPage() {
-        let $this = this;
         let pw = this.linkeditor.pw;
         let single = this.linkeditor.single;
-        let rtl = this.linkeditor.rtl
         $.each(LINKS, function (uid, link) {
             link.left = parseFloat(link.left)
-            if (!rtl) {
+            if (!single) {
                 if (link.page % 2 === 0 && link.left > pw) {
                     link.page++;
                     link.left -= pw;
@@ -879,11 +877,6 @@ LinkeditorLinks.prototype = {
                     link.page--;
                     link.left += pw;
                 }
-            } else {
-                if (link.page % 2 === 0) {
-                    link.page++;
-                    link.left += pw;
-                }
             }
             LINKS[uid] = link;
         });
index de2dc50751a22a04f6823d923d2843d4b1d934c4..05a3efd6419db85fda345a6f7f142b5ec4c06a47 100644 (file)
@@ -147,13 +147,9 @@ LinkeditorUtils.prototype = {
 
     roundDimension: function (v) {
         return (Math.round(v * 100000) / 100000);
-    },
-
-    intersectRect: function (r1, r2) {
+    }, intersectRect: function (r1, r2) {
         return !(r2.left > r1.right || r2.right < r1.left || r2.top > r1.bottom || r2.bottom < r1.top);
-    },
-
-    isfocusOnFormItem: function () {
+    }, isfocusOnFormItem: function () {
         return $(document.activeElement).is('input[type="text"],input[type="email"],input[type="number"],input[type="tel"],input[type="search"],textarea,select');
     },