Bmansurov has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/166075

Change subject: Wrap math formulas in a scrollable div
......................................................................

Wrap math formulas in a scrollable div

Bug: 66679
Change-Id: I28864aaf4e7bb4201648849f153f7a0f2f17beb4
---
M javascripts/Page.js
M less/content/hacks.less
2 files changed, 10 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend 
refs/changes/75/166075/1

diff --git a/javascripts/Page.js b/javascripts/Page.js
index f11026a..e4aa708 100644
--- a/javascripts/Page.js
+++ b/javascripts/Page.js
@@ -175,6 +175,11 @@
                        } );
                },
 
+               postRender: function ( options ) {
+                       // wrap tex formulas or images in a horizontally 
scrollable div
+                       $('.tex').wrap('<div class="tex-holder"></div>');
+               },
+
                /**
                 * @method
                 */
diff --git a/less/content/hacks.less b/less/content/hacks.less
index 0c221cc..a6200be 100644
--- a/less/content/hacks.less
+++ b/less/content/hacks.less
@@ -112,3 +112,8 @@
                }
        }
 }
+
+// hack to make math formulas horizontally scrollable
+.tex-holder {
+  overflow-y: auto;
+}
\ No newline at end of file

-- 
To view, visit https://gerrit.wikimedia.org/r/166075
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I28864aaf4e7bb4201648849f153f7a0f2f17beb4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Bmansurov <bmansu...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to