Changing the selection area behaviour

The pixenate product walks a fine line between programmability and configurability.
If you want to change the behaviour of the selection area so that only the corner resize handles are displayed then add the following javascript code to your page…

PXN8.dom.addLoadEvent(function(){
   delete PXN8.resize.handles.n;
   delete PXN8.resize.handles.s;
   delete PXN8.resize.handles.w;
   delete PXN8.resize.handles.e;
   PXN8.initialize("http://mydomain/myimage.jpg");
});

kate_crop_corners.jpg

On the other hand, if you only want to display the top, left, bottom and right resize handles and don’t want to display the corner resize handles …

PXN8.dom.addLoadEvent(function(){
   delete PXN8.resize.handles.nw;
   delete PXN8.resize.handles.sw;
   delete PXN8.resize.handles.ne;
   delete PXN8.resize.handles.se;
   PXN8.initialize("http://mydomain/myimage.jpg");
});

kate_crop_notcorners.jpg

Disabling the display of the north, south, east and west resize handles is a good idea if you want to enforce a fixed aspect ratio.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: