LTR/RTL directionality suport

Add dir-ltr|rtl to h5p-content div, based on iframe parent document directionality.
(Which will help us address proper rtl alignment and directionality css selectors, in future patches)

Fix is only needed for iframe embedding. as parent document directionality is already available to div embedding.
pull/23/head
Nadav Kavalerchik 2016-07-03 00:30:17 +03:00 committed by GitHub
parent 406a55be5c
commit a2cd04e57f
1 changed files with 3 additions and 0 deletions

View File

@ -111,6 +111,9 @@ H5P.init = function (target) {
params: JSON.parse(contentData.jsonContent)
};
// Add dir-ltr|rtl to h5p-content div, based on iframe parent document directionality.
$element.addClass('dir-' + window.parent.document.dir);
H5P.getUserData(contentId, 'state', function (err, previousState) {
if (previousState) {
library.userDatas = {