Translations:Course-v1:Arbisoft+CS100+2022 T2/en/block-v1:Arbisoft+CS100+2022 T2+type@html+block@26478d01840b4c89967724a9317bb0eb/content/en

From MLEB Master
Jump to navigation Jump to search

Zooming Image Tool

Use the Zooming Image Tool to enable learners to see details of large, complex images.

With the Zooming Image Tool, the learner can move the mouse pointer over a part of the image to enlarge it and see more detail.

To use the Zooming Image Tool, you must first add the <a href="http://files.edx.org/jquery.loupeAndLightbox.js" target="_blank">jquery.loupeAndLightbox.js JavaScript file</a> to your course.

You must also add both the regular and magnified image files to your course.

The following HTML code shows the format required to use the Zooming Image tool. For the example in this template, you must replace the values in italics.

  <div class="zooming-image-place" style="position: relative;">
    <a class="loupe" href="<i>path to the magnified version of the image</i>">
      <img alt="<i>Text for screen readers</i>"
        src="<i>path to the image you want to display in the unit</i>" />
    </a>
    <div class="script_placeholder"
      data-src="<i>path to the jquery.loupeAndLightbox.js JavaScript file in your course</i>"/>
  </div>
  <script type="text/javascript">// >![CDATA[
  JavascriptLoader.executeModuleScripts($('.zooming-image-place').eq(0), function() {
    $('.loupe').loupeAndLightbox({
      width: 350,
      height: 350,
      lightbox: false
    });
  });
  // ]]></script>
  <div id="ap_listener_added"></div>
  

You can modify the example below for your own use.

  1. Replace the value of the link's href attribute with the path to the magnified image. Do not change the value of the class attribute.
  2. Replace the value of the image's src attribute with the path to the image that will appear in the unit.
  3. Replace the value of the image's alt attribute with text that both describes the image and the action or destination of clicking on the image. You must include alt text to provide an accessible label.
  4. Replace the value of the div element's data-src attribute with the path to the jquery.loupeAndLightbox.js JavaScript file in your course.

The example below shows a subset of the biochemical reactions that cells carry out.

You can view the chemical structures of the molecules by clicking on them. The magnified view also lists the enzymes involved in each step.

Press spacebar to open the magnifier.

 <a class="loupe" href="https://studio.edx.org/c4x/edX/DemoX/asset/pathways_detail_01.png">
     <img alt="magnify" src="https://studio.edx.org/c4x/edX/DemoX/asset/pathways_overview_01.png" />
   </a>

<script type="text/javascript">// <![CDATA[ JavascriptLoader.executeModuleScripts($('.zooming-image-place').eq(0), function() {

 $('.loupe').loupeAndLightbox({
   width: 350,
   height: 350,
   lightbox: false
 });

}); // ]]></script>