comparison client/digitallibrary/jquery/jquery.digilib.geometry.js @ 877:971b7122930f jquery

arrows: got basic functionality working
author hertzhaft
date Thu, 17 Mar 2011 16:43:59 +0100
parents c662bf335881
children
comparison
equal deleted inserted replaced
876:a5a460afb912 877:971b7122930f
183 that.addPosition = function(pos) { 183 that.addPosition = function(pos) {
184 this.x += pos.x; 184 this.x += pos.x;
185 this.y += pos.y; 185 this.y += pos.y;
186 return this; 186 return this;
187 }; 187 };
188 // adds pos to the dimensions
189 that.enlarge = function(pos) {
190 this.width += pos.x;
191 this.height += pos.y;
192 return this;
193 };
188 // sets the lower right corner to position pos 194 // sets the lower right corner to position pos
189 that.setPt2 = function(pos) { 195 that.setPt2 = function(pos) {
190 this.width = pos.x - this.x; 196 this.width = pos.x - this.x;
191 this.height = pos.y - this.y; 197 this.height = pos.y - this.y;
192 return this; 198 return this;