Mercurial > hg > digilib
diff client/digitallibrary/jquery/jquery.digilib.js @ 664:dcd64ecdd64a jquery
still working on correct transform for rotations... (still doesn't)
author | robcast |
---|---|
date | Tue, 25 Jan 2011 11:01:45 +0100 |
parents | fda2d9bd9ba7 |
children | 0d3d9517e448 |
line wrap: on
line diff
--- a/client/digitallibrary/jquery/jquery.digilib.js Mon Jan 24 23:07:57 2011 +0100 +++ b/client/digitallibrary/jquery/jquery.digilib.js Tue Jan 25 11:01:45 2011 +0100 @@ -798,9 +798,14 @@ trafo.concat(trafo.getScale(geom.size(1/area.width, 1/area.height))); // rotate if (data) { - var rot = trafo.getRotationAround(-parseFloat(data.settings.rot), - geom.position(0.5 * area.width + area.x, 0.5 * area.height + area.y)); + /* var rot = trafo.getRotationAround(parseFloat(data.settings.rot), + geom.position(0.5 * area.width + area.x, 0.5 * area.height + area.y)); */ + var rot = trafo.getRotation(parseFloat(data.settings.rot)); + var trans1 = trafo.getTranslation(geom.position(-0.5 * area.width + area.x, -0.5 * area.height + area.y)); + var trans2 = trafo.getTranslation(geom.position(0.5 * area.width + area.x, 0.5 * area.height + area.y)); + trafo.concat(trans1); trafo.concat(rot); + trafo.concat(trans2); } // scale to screen position and size trafo.concat(trafo.getScale(picrect));