comparison webapp/src/main/webapp/jquery/jquery.digilib.geometry.js @ 953:3d5e7458f9ae

fixed birdseye region positioning after layout reflow. added zoom area aspect ration change detection -- does nothing yet.
author robcast
date Wed, 04 Jan 2012 11:28:46 +0100
parents 3916303b8f17
children c4bd6f984aee
comparison
equal deleted inserted replaced
952:e3dc84cbb766 953:3d5e7458f9ae
222 }; 222 };
223 // returns the area of this Rectangle 223 // returns the area of this Rectangle
224 that.getArea = function() { 224 that.getArea = function() {
225 return (this.width * this.height); 225 return (this.width * this.height);
226 }; 226 };
227 // returns the aspect ratio of this Rectangle
228 that.getAspect = function() {
229 return (this.width / this.height);
230 };
227 // eliminates negative width and height 231 // eliminates negative width and height
228 that.normalize = function() { 232 that.normalize = function() {
229 var p = this.getPt2(); 233 var p = this.getPt2();
230 this.x = Math.min(this.x, p.x); 234 this.x = Math.min(this.x, p.x);
231 this.y = Math.min(this.y, p.y); 235 this.y = Math.min(this.y, p.y);