define([], function() { function ViewFinder(dispatcher, visibility) { // constructor // private variables this._dispatcher = dispatcher; this._state = null; this._visibility = visibility; this._viewerID = ''; //var this._cta; this._vfHeight; this._vfWidth; this._vfTop; this._vfLeft; this._vfScale; this._vfBoxWidth; this._vfBoxHeight; this._vfBoxLeft; this._vfBoxTop; this._clickStartTime = 0; // privileged functions this.initialiseViewFinder = function() { var imageWidth = RICHFX.jQuery('#RICHFXViewerContainer_'+this._viewerID).width(); var imageHeight = RICHFX.jQuery('#RICHFXViewerContainer_'+this._viewerID).height(); // Work out various values this._vfWidth = 75; this._vfHeight = (this._vfWidth/imageWidth) * imageHeight; this._vfTop = imageHeight - this._vfHeight; this._vfLeft = imageWidth - this._vfWidth; this._vfScale = this._vfWidth/imageWidth; if ( this._visibility ) { // Add required divs this._vf = RICHFX.jQuery('#RICHFXViewerContainer_'+this._viewerID).append('