# HG changeset patch # User robcast # Date 1295949705 -3600 # Node ID a53c3e12995ab3965533915734588d3827637d27 # Parent 11d96bc0ac09c31699ef1abd07821d8385e8ecef still working on correct transform for rotations... (still doesn't) diff -r 11d96bc0ac09 -r a53c3e12995a client/digitallibrary/jquery/dlGeometry.js --- a/client/digitallibrary/jquery/dlGeometry.js Mon Jan 24 23:07:57 2011 +0100 +++ b/client/digitallibrary/jquery/dlGeometry.js Tue Jan 25 11:01:45 2011 +0100 @@ -245,9 +245,10 @@ for (var j = 0; j < 3; j++) { var c = 0.0; for (var k = 0; k < 3; k++) { - c += traf["m"+i.toString()+k.toString()] * this["m"+k.toString()+j.toString()]; + c += traf["m"+i+k] * this["m"+k+j]; + //c += this["m"+i.toString()+k.toString()] * traf["m"+k.toString()+j.toString()]; } - this["m"+i.toString()+j.toString()] = c; + this["m"+i+j] = c; } } return this; diff -r 11d96bc0ac09 -r a53c3e12995a client/digitallibrary/jquery/jquery.digilib.js --- 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));