Mercurial > hg > digilib
comparison 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 |
comparison
equal
deleted
inserted
replaced
663:fda2d9bd9ba7 | 664:dcd64ecdd64a |
---|---|
796 trafo.concat(trafo.getTranslation(geom.position(-area.x, -area.y))); | 796 trafo.concat(trafo.getTranslation(geom.position(-area.x, -area.y))); |
797 // zoom area size | 797 // zoom area size |
798 trafo.concat(trafo.getScale(geom.size(1/area.width, 1/area.height))); | 798 trafo.concat(trafo.getScale(geom.size(1/area.width, 1/area.height))); |
799 // rotate | 799 // rotate |
800 if (data) { | 800 if (data) { |
801 var rot = trafo.getRotationAround(-parseFloat(data.settings.rot), | 801 /* var rot = trafo.getRotationAround(parseFloat(data.settings.rot), |
802 geom.position(0.5 * area.width + area.x, 0.5 * area.height + area.y)); | 802 geom.position(0.5 * area.width + area.x, 0.5 * area.height + area.y)); */ |
803 var rot = trafo.getRotation(parseFloat(data.settings.rot)); | |
804 var trans1 = trafo.getTranslation(geom.position(-0.5 * area.width + area.x, -0.5 * area.height + area.y)); | |
805 var trans2 = trafo.getTranslation(geom.position(0.5 * area.width + area.x, 0.5 * area.height + area.y)); | |
806 trafo.concat(trans1); | |
803 trafo.concat(rot); | 807 trafo.concat(rot); |
808 trafo.concat(trans2); | |
804 } | 809 } |
805 // scale to screen position and size | 810 // scale to screen position and size |
806 trafo.concat(trafo.getScale(picrect)); | 811 trafo.concat(trafo.getScale(picrect)); |
807 trafo.concat(trafo.getTranslation(picrect)); | 812 trafo.concat(trafo.getTranslation(picrect)); |
808 /* if (data && data.settings.rot) { | 813 /* if (data && data.settings.rot) { |