[bknr-cvs] r1996 - branches/xml-class-rework/projects/bos/payment-website/infosystem
bknr at bknr.net
bknr at bknr.net
Sun Oct 15 09:13:30 UTC 2006
Author: hhubner
Date: 2006-10-15 05:13:29 -0400 (Sun, 15 Oct 2006)
New Revision: 1996
Modified:
branches/xml-class-rework/projects/bos/payment-website/infosystem/javascript.js
Log:
Clipping corrected.
Modified: branches/xml-class-rework/projects/bos/payment-website/infosystem/javascript.js
===================================================================
--- branches/xml-class-rework/projects/bos/payment-website/infosystem/javascript.js 2006-10-15 08:58:32 UTC (rev 1995)
+++ branches/xml-class-rework/projects/bos/payment-website/infosystem/javascript.js 2006-10-15 09:13:29 UTC (rev 1996)
@@ -426,17 +426,14 @@
image.width = contract.width * factor;
image.height = contract.height * factor;
- // falls der Vertrag aus dem angezeigten Bereich herausragt, wird das bild entsprechend geclipped.
- // XXX fixme das ist noch nicht "ganz" fertig hier *hüstel*
- if ((contract.left + contract.width - x_anf) > 360) {
- container.style.clip
- = 'rect(0px '
- + (contract.width - (contract.left + contract.width - x_anf - 360)) * factor + 'px '
- + (contract.height - (contract.top + contract.height - y_anf - 360)) * factor + 'px '
- + '0px)';
- } else {
- container.style.clip = 'rect(auto auto auto auto)';
- }
+ // Falls der Vertrag aus dem angezeigten Bereich herausragt, wird das bild entsprechend geclipped.
+ container.style.clip
+ = 'rect('
+ + Math.max(0, y_anf - contract.top) * factor + 'px '
+ + Math.min(contract.width, contract.width - (contract.left + contract.width - x_anf - 360)) * factor + 'px '
+ + Math.min(contract.height, contract.height - (contract.top + contract.height - y_anf - 360)) * factor + 'px '
+ + Math.max(0, x_anf - contract.left) * factor + 'px'
+ + ')';
container.style.left = (contract.left - x_anf) * factor + 'px';
container.style.top = (contract.top - y_anf) * factor + 'px';
More information about the Bknr-cvs
mailing list