SET CALLBACK EXAMPLE


This example demonstrates the callback support of the Zoomify Image Viewer. Use the Set Callback and Clear Callback buttons to assign a function to execute whenever the view is changed by zooming or panning. The Zoomify Image Viewer supports callback assignments on initialization, view changes, data loading, and more.

To see this example callback in action simply click the Set Callback button, then click the image to zoom - notice the alert when the zoom completes. Click the Clear Callback button and zoom again to verify the callback has been cleared.

Additional callback options are listed below. Note that creation of custom callbacks simply requires adding a validation call at the desired point in the code. For example: Z.Utils.validateCallback('myCustomCallback'); See the Zoomify Function List in the Developer Resources folder for details. Supported callbacks include:

Note that additional visibility into the actions of the Viewer can be had using the function getStatus. See the Function List for more information.

annotationsLoaded currentLabelChangedGetID drawLabelsOnCanvasComplete
galleryInitialized labelCreated labelCreatedGetInternalID
labelSaved labelSavedGetJSONObject labelSelectedInViewportGetIDs
loadingTilesComplete loadingTilesCompleteGetLabelIDs loadingTilesFullImageComplete
navigatorInitialized noteSaved panConstrained
poiSaved rulerInitialized screensaverStarting
slideshowLoaded toolbarInitialized tourLoaded
trackingLoaded trackingLoaded usersLoaded
viewChanged viewChanging viewPanned
viewZoomed viewUpdateComplete viewUpdateCompleteGetLabelIDs
viewZoomingGetCurrentZoom viewportChanged zoomConstrainedMax
zoomConstrainedMin