var NoZoomSelectionModel = function(annotation, canModify, isSelected) {
Annotations.BoxSelectionModel.call(this, annotation, canModify, isSelected);
};
NoZoomSelectionModel.prototype = {
testSelection: function(annotation, x, y, zoom) {
var width = annotation.Width;
var height = annotation.Height;
if (annotation.NoZoom) {
width /= zoom;
height /= zoom;
}
var right = annotation.X + width;
var bottom = annotation.Y + height;
return (x >= annotation.X && x <= right && y >= annotation.Y && y <= bottom);
}
};
NoZoomSelectionModel.prototype = $.extend(true, new Annotations.BoxSelectionModel(), NoZoomSelectionModel.prototype);
var stampDraw = Annotations.StampAnnotation.prototype.draw;
Annotations.StampAnnotation.prototype.draw = function(ctx) {
if (this.NoZoom) {
ctx.translate(-this.X, -this.Y);
}
stampDraw.apply(this, arguments);
};
Annotations.StampAnnotation.prototype.selectionModel = NoZoomSelectionModel;