@oat-sa/tao-core-ui 3.18.5 → 3.18.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -301,7 +301,9 @@ function mediaplayerFactory(config) {
301
301
  */
302
302
  render(to) {
303
303
  const renderTo = to || this.config.renderTo || this.$container;
304
-
304
+ const isVertical = ($('body').hasClass('item-writing-mode-vertical-rl')
305
+ || $(renderTo).closest('.qti-interaction, .custom-text-box').hasClass('writing-mode-vertical-rl'))
306
+ && !$(renderTo).closest('.qti-interaction, .custom-text-box').hasClass('writing-mode-horizontal-tb');
305
307
  if (this.$component) {
306
308
  this.destroy();
307
309
  }
@@ -317,7 +319,7 @@ function mediaplayerFactory(config) {
317
319
  this._initPlayer();
318
320
  this._initSize();
319
321
 
320
- if ($('body').hasClass('item-writing-mode-vertical-rl')) {
322
+ if (isVertical) {
321
323
  // Change size axis for vertical writing view mode
322
324
  this.resize(this.config.height, this.config.width);
323
325
  } else {