Index: lams_monitoring/web/includes/javascript/monitorLesson.js =================================================================== diff -u -rfe06d16b234341fc965d9b40494e6a2fb4cb9438 -r8fb65aa233a7a3fdf2d315ae2cbae0677d998989 --- lams_monitoring/web/includes/javascript/monitorLesson.js (.../monitorLesson.js) (revision fe06d16b234341fc965d9b40494e6a2fb4cb9438) +++ lams_monitoring/web/includes/javascript/monitorLesson.js (.../monitorLesson.js) (revision 8fb65aa233a7a3fdf2d315ae2cbae0677d998989) @@ -823,18 +823,31 @@ return; } - var dblClickFunction = - // different behaviour for regular/branching activities - activity.isBranching ? - function(){ showBranchingSequence(activity.id); } - : - function(){ - // double click on activity shape to open Monitoring for this activity - openPopUp(LAMS_URL + activity.url, "MonitorActivity", 720, 900, true, true); - }; + var activityElems = [coord.elem], + dblClickFunction = + // different behaviour for regular/branching activities + activity.isBranching ? + function(){ showBranchingSequence(activity.id); } + : + function(){ + // double click on activity shape to open Monitoring for this activity + openPopUp(LAMS_URL + activity.url, "MonitorActivity", 720, 900, true, true); + }; + + // find the activity image, but skip learner and attention icons + $('image:not([id^="act"])', sequenceCanvas).each(function(){ + var image = $(this), + x = +image.attr('x'), + y = +image.attr('y'); + if (x > coord.x && x < coord.x2 && y > coord.y && y < coord.y2) { + activityElems.push(image); + } + }); + // find activity group, if it is not hidden - coord.elem.css('cursor', 'pointer') - // double tap detection on mobile devices; it works also for click + $.each(activityElems, function(){ + $(this).css('cursor', 'pointer') + // double tap detection on mobile devices; it works also for mouse clicks .tap(function(event){ var currentTime = new Date().getTime(), tapLength = currentTime - lastTap; @@ -844,6 +857,7 @@ } lastTap = currentTime; }); + }); } });