]> _ Git - fluidbook-html5.git/commitdiff
Fix #1632 @0.5
authorStephen Cameron <stephen@cubedesigners.com>
Wed, 6 Sep 2017 09:31:00 +0000 (11:31 +0200)
committerStephen Cameron <stephen@cubedesigners.com>
Wed, 6 Sep 2017 09:31:00 +0000 (11:31 +0200)
js/libs/fluidbook/fluidbook.resize.js
style/fluidbook.less

index 2f5a11535e229590bdc8bc3baba77f885092b4ed..28efa5ad3f88c67f4becf5723c25cf161068c389 100644 (file)
@@ -24,6 +24,10 @@ function FluidbookResize(fluidbook) {
 FluidbookResize.prototype = {
     init: function () {
 
+        // Manage transform origins based on text direction
+        // This is important for the elements to have the correct position after scaling
+        // Note: the #logo is handled in the CSS because it is also affected by the .menu-inverted class
+
         var left = this.fluidbook.l10n.dir == 'ltr' ? '0%' : '100%';
         var right = this.fluidbook.l10n.dir == 'ltr' ? '100%' : '0%';
 
@@ -31,10 +35,6 @@ FluidbookResize.prototype = {
             origin: [left, '0%']
         });
 
-        $("#logo").transform({
-            origin: [right, '0%']
-        });
-
         $("#footer").transform({
             origin: [right, '100%']
         });
index 2a89fb595251f8f8ec2084e562fef39afad748e1..d140382eb200e7efa0ca5818cd33b6b64dd795de 100644 (file)
@@ -734,12 +734,14 @@ header {
        .ltr &, .rtl.menu-inverted & {
                right: 0;
                left: auto;
+               transform-origin: 100% 0; // Top right transform origin so positioning is correct after scaling
        }
 
        // Positioning for right-to-left Fluidbooks + inverted menu on LTR
        .rtl &, .ltr.menu-inverted & {
                left: 0;
                right: auto;
+               transform-origin: 0 0; // Top left transform origin so positioning is correct after scaling
        }
 }