[英]how do you initiate cropper to crop image in fengyuanchen cropper
I am using the fengyuanchen cropper and am using the crop-avatar example and want to pre-load an image into the cropper on load ready for editing. 我正在使用fengyuanchen裁剪器,并使用crop-avatar示例,并希望在加载时将图像预加载到裁剪器中以供编辑。 Ie an image which has already been uploaded to the server.
即,已经上传到服务器的图像。
I have spent hours on this and got no where does anyone know how to do this? 我已经花了几个小时,却没有人知道该怎么做?
https://github.com/fengyuanchen/cropper/tree/master/examples/crop-avatar https://github.com/fengyuanchen/cropper/tree/master/examples/crop-avatar
I have done this with pulling the base64 from the server and populating on load. 我通过从服务器中拉出base64并在负载中填充来完成此操作。
// Added a class or just load
var $image = $('.img-container > img');
Maybe I'm missing it but, I put the image in 2 spots on for view and one for crop. 也许我想念它,但是我将图像分成2个斑点供观看,其中1个用于裁剪。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.