Mercurial > hg > digilib-old
diff webapp/src/main/webapp/jquery/jquery.digilib.geometry.js @ 1113:7affda55c10e
using annotator in digilib works somewhat now.
author | robcast |
---|---|
date | Thu, 01 Nov 2012 18:38:11 +0100 |
parents | 1e4f4964e9c2 |
children | efe4b0f18cf8 |
line wrap: on
line diff
--- a/webapp/src/main/webapp/jquery/jquery.digilib.geometry.js Tue Oct 30 20:23:24 2012 +0100 +++ b/webapp/src/main/webapp/jquery/jquery.digilib.geometry.js Thu Nov 01 18:38:11 2012 +0100 @@ -126,6 +126,13 @@ var dy = pos.y - this.y; return Math.sqrt(dx * dx + dy * dy); }; + // returns position in css-compatible format + that.getAsCss = function() { + return { + left : this.x, + top : this.y, + }; + }; that.toString = function() { return (this.x + "," + this.y); };