|
[建议]
imageClip手动调整大小之后,如何提示保存
[复制链接]
想通过imageClip实现读取一张图之后,通过设置flaxation 为“false”,以便手动调整截图区域。请问如何实现啊?
我下边的代码不可行,只能在弹出confirm消息后,才能手动调截图位置,而且调整好了,如何保存?
var imageClip = api.require('imageClip');
imageClip.open({
path : ""+ ret.data +"",
x : 0,
y : 100,
h : api.winHeight - 100,
w : api.winWidth,
clipRect : {
x : api.winWidth / 2 - 100,
y : api.winHeight / 2 - 100,
w : 200,
h : 200,
fixation : false
}
}, function(ret, err) {
api.confirm({
title:'提示消息',
msg:'确认裁剪吗?',
buttons:['确认','调整']
},function(ret,err){
if(2 == ret.buttonIndex){
imageClip.reset();
}else
{ imageClip.save({album : true });
}
});
});
|
|