Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

支持多preview的代码,我自己弄了个2.2,希望作者采纳_需要源码联系我_qq_1164636434 #22

Open
wutao0315 opened this issue Feb 7, 2014 · 0 comments

Comments

@wutao0315
Copy link

var crop = new ImgCrop({
areaEl: "#J_CropBox",
initialXY: [10, 10],
initWidth: 200,
initHeight: 200,
minHeight: 100,
minWidth: 100,
areaWidth: 300,
areaHeight: 300,
//previewEl: "#J_PrevBox_75",//不需要不配置
//viewWidth: 75,
//viewHeight: 75,
previewArrayParam: [
{ viewEl: '#J_PrevBox_180', viewWidth: 180, viewHeight: 180 },
{ viewEl: '#J_PrevBox_75', viewWidth: 75, viewHeight: 75 },
{ viewEl: '#J_PrevBox_50', viewWidth: 50, viewHeight: 50 },
{ viewEl: '#J_PrevBox_25', viewWidth: 25, viewHeight: 25 }],
touchable: true,
resizable: true,
ratio: true,
maskColor: '#000',
maskOpacity: '0.6',
cubesColor: '#fff',
borderColor: '#fff',
url: 'http://img01.taobaocdn.com/imgextra/i1/14888019145001501/T1_iIPXl8dXXXXXXXX_!!855984888-0-pix.jpg'
});

    crop.on('imgload drag resize', function () {
        S.one('#J_InfoBox').val(crop.toString(4));
        //S.log(S.JSON.stringify(crop.getOriginalSize()));
        //S.log(S.JSON.stringify(crop.getDisplaySize()));
    });
    crop.render();

修改并不多

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant