Controlling window preview size

13 views
Skip to first unread message

R.D.

unread,
Feb 28, 2009, 9:27:54 PM2/28/09
to javascript-image-cropper-ui
Hi.

Is it possible to keep the window preview size static... say 200 X 300
pixels but set the minWidth: & minHeight: settings to something other
than that size?


It seems the minWidth & minHeight attribute in the js code below
control the preview window also. Is it possible to have the default
crop area small (20 X 30) allowing the user to expand it
proportionally while keeping the preview window the same size at all
times (200 X 300)?

Thanks for any help.

new Cropper.ImgWithPreview(
'testImage',
{

minWidth: 40,
minHeight: 60,

ratioDim: { x: 60, y: 90 },
displayOnInit: true,
onEndCrop: onEndCrop,
previewWrap: 'previewArea'
}

Jason

unread,
Mar 22, 2009, 4:43:53 PM3/22/09
to javascript-image-cropper-ui
Sounds like you want to be able to scale-up (or zoom-in) your
selection to the preview area.

You can do this with a cropper extension from Andy Stanberry. His
extension's main cause is to allow you to have multiple preview areas
on a page, but it also implements the zoom-in capability, so I am
using it with just one preview area just to get the zoom capability.

In fact you don't even have to set the minWidth and minHeight
properties.

http://www.negativemargins.com/javascript-ui-cropper-with-multiple-previews/
Reply all
Reply to author
Forward
0 new messages