Library Heat Regions
A tool that records how regions of an image are clicked.
- Zachary Anderson
- Written for Lighthouse Studio 9.3
- Last Updated: 28 February 2017
An advanced "heat map"-like tool. Supports virtually any behavior, from simply recording whether a region was selected to asking followup questions about the selected region.
- Lines 56-58 of header 1 must be updated with the image and its dimensions.
- Inside the
$(document).readyevent after the
initializeSvgcall, you must call
addRegionfor each region of the image.
addRegionhas these parameters:
questionshould always be set to
'[% QuestionName() %]'.
regionmust define the shape and location of the region. All positions are defined off the top-left corner of the image.
circlerequires center coordinates
ellipserequires center coordinates
polygonrequires three or more
followupsis a list of questions to show if the region is clicked.
startwill be called after the region is initialized. Useful for restoring the region if a respondent leaves the question and later returns to it.
verificationwill be called when the respondent attempts to submit the
followups. Should return a Boolean.
failwill be called when
false. Useful for explaining what is wrong with the response.
passwill be called when
true. Useful for making changes to the question or region to reflect the response.
The rectangle and circle built into the download can serve as an example of how to prompt the respondent, require a response, and update the display accordingly.
The triangle built into the download can serve as an example of how to build an "on-off" region.
pass will be called with two arguments.
The first argument is the clicked region. The second argument is