Skip to content
Snippets Groups Projects
Commit 4c56f00a authored by srosse's avatar srosse
Browse files

OO-4381: handle gracefully question larger than the video

parent 7f7b2a3d
No related branches found
No related tags found
No related merge requests found
#foreach($marker in $markers) #foreach($marker in $markers)
<div id="marker_${marker.id}" class="mejs__overlay o_video_marker" style="" #if($r.isTrue($dragMarkers)) draggable="true" #end>$r.xssScan($marker.text)</div> <div id="marker_${marker.id}" class="mejs__overlay o_video_marker" style="" #if($r.isTrue($dragMarkers)) draggable="true" #end>$r.xssScan($marker.text)</div>
<script> <script>
/* <![CDATA[ */
jQuery(function() { jQuery(function() {
var containerEl = jQuery(".mejs__container"); var containerEl = jQuery(".mejs__container");
var top = ${marker.top} * containerEl.height(); var top = ${marker.top} * containerEl.height();
...@@ -53,6 +52,5 @@ jQuery(function() { ...@@ -53,6 +52,5 @@ jQuery(function() {
setTimeout(function() { BFormatter.formatLatexFormulas('marker_${marker.id}'); }, 100); setTimeout(function() { BFormatter.formatLatexFormulas('marker_${marker.id}'); }, 100);
}); });
/* ]]> */
</script> </script>
#end #end
\ No newline at end of file
<div class="mejs__overlay o_video_question"> ##o_zoomed_question <div id="o_wrap_question_${videoElementId}" class="mejs__overlay o_video_question">
$r.render("question") $r.render("question")
</div> </div>
<script> <script>
/* <![CDATA[ */
jQuery(function() { jQuery(function() {
var player = jQuery('#o_so_vid${videoElementId}').data('player'); var player = jQuery('#o_so_vid${videoElementId}').data('player');
player.pause(); player.pause();
...@@ -13,6 +12,11 @@ jQuery(function() { ...@@ -13,6 +12,11 @@ jQuery(function() {
.hide() .hide()
.css("width", "0%"); .css("width", "0%");
#end #end
var qtiContainerHeight = jQuery('#o_qti_container').height();
var videoHeight = jQuery('#o_so_vid${videoElementId} video').height();
if(videoHeight > 0 && videoHeight < qtiContainerHeight) {
jQuery('#o_wrap_question_${videoElementId}').addClass('o_video_large_question')
}
}); });
/* ]]> */
</script> </script>
...@@ -127,6 +127,20 @@ ...@@ -127,6 +127,20 @@
} }
} }
.o_video_marker_editor .o_video_question.mejs__overlay {
overflow: scroll;
}
.o_video_question.mejs__overlay.o_video_large_question {
align-items: flex-start;
padding: 1em 1em 0 1em;
z-index: 5;
#o_qti_container {
border: 1px solid $gray-lighter;
}
}
.o_video_marker { .o_video_marker {
position: absolute; position: absolute;
background-color: $o-video-marker-bg-color; background-color: $o-video-marker-bg-color;
...@@ -197,11 +211,6 @@ ...@@ -197,11 +211,6 @@
} }
} }
.o_video_question.o_zoomed_question #o_qti_container {
zoom: 0.5;
-moz-transform: scale(0.5);
}
.mejs__time-rail { .mejs__time-rail {
.o_video_marker_gray { .o_video_marker_gray {
background: $gray-dark; background: $gray-dark;
......
source diff could not be displayed: it is too large. Options to address this: view the blob.
source diff could not be displayed: it is too large. Options to address this: view the blob.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment