Changed thumbnail geometry representation
authorThierry Florac <thierry.florac@onf.fr>
Mon, 02 Mar 2015 15:26:52 +0100
changeset 1 36a56f22e80b
parent 0 63811b2a5670
child 2 2cbea3d9e537
Changed thumbnail geometry representation
src/pyams_file/image.py
--- a/src/pyams_file/image.py	Thu Feb 19 10:56:21 2015 +0100
+++ b/src/pyams_file/image.py	Mon Mar 02 15:26:52 2015 +0100
@@ -22,7 +22,6 @@
 
 # import packages
 from pyams_utils.adapter import ContextAdapter, adapter_config
-from zope.component import adapter
 from zope.interface import implementer
 from zope.schema.fieldproperty import FieldProperty
 
@@ -39,6 +38,9 @@
     x2 = FieldProperty(IThumbnailGeometry['x2'])
     y2 = FieldProperty(IThumbnailGeometry['y2'])
 
+    def __repr__(self):
+        return '<ThumbnailGeometry: x1,y1={0.x1},{0.y1} - x2,y2={0.x2},{0.y2}>'.format(self)
+
 
 @adapter_config(context=IImage, provides=IThumbnailer)
 class ImageThumbnailer(ContextAdapter):