imgareaselect
imgareaselect copied to clipboard
Allow aspectRatio to be passed as a float
Currently, aspect ratio must be supplied as two numbers separated by a colon.
options = {
aspectRatio: "4:3"
}
However, it is often useful to provide the aspect ratio as a single number. Especially if the aspect ratio is calculated by code.
This patch allows configurations such as:
options = {
aspectRatio: 1.5
}
I agree that this would be useful. Since I already calculate the aspect ratio in my code, I hacked my version of the plugin to only take a float, but supporting both possibilities (string or float) is probably best.