Feature request

5 views
Skip to first unread message

Yann

unread,
Jun 23, 2011, 11:06:56 AM6/23/11
to Jcrop Development Discussion
Hello,

First of all, thanks for this very useful plugin!

I have a feature request :
It would be nice to set a min and a max ratio value to forbid
selection of very high (or large) images.

Kelly Hallman

unread,
Jun 23, 2011, 11:51:39 AM6/23/11
to jcro...@googlegroups.com
Hi - thanks for writing.

I think you are asking for a feature to limit what kind of height/width ratios are allowed, so that the selection is not too tall or too wide. While this is not a common request, I can see that it would be useful. Two main problems I have with this:

Adds in extra conditionals. Even if it's mostly psychological or not completely successful, I try to keep the amount of processing necessary to a minimum. There are quite a number of fringe features that could be added this way, but I try to balance the cost/benefit. So this would be the primary objection to any request to add in a feature that needs to be evaluated while selections are being manipulated.

I'm also not totally clear what the behavior would be in the context of hitting the boundary while dragging. For something like "minimum height" or "maximum height" it's clear what happens, it just won't get any bigger. But even there, the "maximum size" must be calculated and displayed, it is not sufficient to just ignore mouse events that would exceed the threshold. This might be fine in some contexts, but for example with aspectRatio enabled, it would not be a solid behavior.

When adding in the idea of "too tall" or "too wide," the behavior becomes even less clear, because the mouse is still being dragged arbitrarily, which might make the boundary appear to be in different places depending on the shape of the crop at that time. At least, that's my take at the moment. I could be having a mental block that is preventing me from seeing how it could work.



--
You received this message because you are subscribed to the Google Groups "Jcrop Development Discussion" group.
To post to this group, send email to jcro...@googlegroups.com.
To unsubscribe from this group, send email to jcrop-dev+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/jcrop-dev?hl=en.


untitled

unread,
Jun 27, 2011, 10:47:20 AM6/27/11
to Jcrop Development Discussion
I'm voting on this feature request! :)

I tried to do it myself but I don't feel good enough. Maybe you could
help implement this feature without adding it to main release?
Reply all
Reply to author
Forward
0 new messages