Pdf/BaladeNature/Js/balade_nature.js
changeset 124 f0f5895259d9
parent 94 d8344a68c91f
child 125 dc7473e2d1af
equal deleted inserted replaced
123:3fc7130d289c 124:f0f5895259d9
     1 // $Id$
     1 // $Id$
     2 // balade_nature
     2 // balade_nature
       
     3 
       
     4 /*global $: true */
       
     5 /*global $$: true */
     3 
     6 
     4 var text = null;
     7 var text = null;
     5 var spot = null;
     8 var spot = null;
     6 var box = null;
     9 var box = null;
     7 var boxProperty = '';
    10 var boxProperty = '';
     9 
    12 
    10 window.addEvent('domready', function(){
    13 window.addEvent('domready', function(){
    11     // Hotspots
    14     // Hotspots
    12     (function initialize() {
    15     (function initialize() {
    13         $$(".pdocHotspot").each(function(hotspot) {
    16         $$(".pdocHotspot").each(function(hotspot) {
    14             var spot = $(hotspot.get('id') + "s")
    17             var spot = $(hotspot.get('id') + "s");
    15             var scenario = hotspot.getElement("span");
    18             var scenario = hotspot.getElement("span");
    16             if (spot && scenario) {
    19             if (spot && scenario) {
    17                 hotspot.addEvent("click", function() {
    20                 hotspot.addEvent("click", function() {
    18                     var spot = $(this.get('id') + "s");
    21                     var spot = $(this.get('id') + "s");
    19                     if (spot.getChildren("img")) {
    22                     if (spot.getChildren("img")) {
    56             effectGlow.onmousemove = onMouseMove;
    59             effectGlow.onmousemove = onMouseMove;
    57             effectGlow.ontouchmove = function (e) {
    60             effectGlow.ontouchmove = function (e) {
    58                 e.preventDefault();
    61                 e.preventDefault();
    59                 e.stopPropagation();
    62                 e.stopPropagation();
    60                 onMouseMove({clientX: e.touches[0].clientX, clientY: e.touches[0].clientY});
    63                 onMouseMove({clientX: e.touches[0].clientX, clientY: e.touches[0].clientY});
    61             }
    64             };
    62         }
    65         }
    63     }
    66     }
    64 });
    67 });
    65 
    68 
    66 
    69