Mercurial > hg > digilib-old
comparison 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 |
comparison
equal
deleted
inserted
replaced
1112:121d3aadfa1e | 1113:7affda55c10e |
---|---|
123 }; | 123 }; |
124 } | 124 } |
125 var dx = pos.x - this.x; | 125 var dx = pos.x - this.x; |
126 var dy = pos.y - this.y; | 126 var dy = pos.y - this.y; |
127 return Math.sqrt(dx * dx + dy * dy); | 127 return Math.sqrt(dx * dx + dy * dy); |
128 }; | |
129 // returns position in css-compatible format | |
130 that.getAsCss = function() { | |
131 return { | |
132 left : this.x, | |
133 top : this.y, | |
134 }; | |
128 }; | 135 }; |
129 that.toString = function() { | 136 that.toString = function() { |
130 return (this.x + "," + this.y); | 137 return (this.x + "," + this.y); |
131 }; | 138 }; |
132 return that; | 139 return that; |