/**
*  @author William Malone (www.williammalone.com)
*/

WM.targetView = function (GLOBAL, WM, ctx, options) {
	
	var that = WM.view(GLOBAL, WM, ctx, options);
	
	that.type = "TRACK";
	that.dirty = true;
	that.active = false;
	
	that.render = function () {
		if (that.dirty || that.alwaysDirty) {
			if (that.active) {
				
				that.ctx.drawImage(that.imageResource.image, that.x * window.innerWidth / 1024, that.y * window.innerHeight / 768, that.imageResource.image.width * window.innerWidth / 1024, that.imageResource.image.height * window.innerHeight / 768);
			}
			//that.dirty = false;
		}
	}
	
	return that;
}