AlloyCrop icon indicating copy to clipboard operation
AlloyCrop copied to clipboard

确定/取消按钮点击穿透的问题

Open dongnaebi opened this issue 7 years ago • 2 comments

点透问题建议统一使用touch事件吧,还有希望给最外层的div加个样式名(好改样式),也希望能限制滑动区域(不超过图片范围)或者给一个参数来开关这个限制

dongnaebi avatar Dec 27 '17 10:12 dongnaebi

找到解决方法了吗,点击穿透

AzronChan avatar Aug 21 '18 16:08 AzronChan

这个方案可以把cancel回调和ok回调加上一个setTimeout解决。

_cancel: function () {
    setTimeout(() => {
        this._css(this.croppingBox, {
            display: "none"
        });
    }, 300);
    this.cancel();
},
_ok: function () {
    this.crop();
    setTimeout(() => {
        this._css(this.croppingBox, {
            display: "none"
        });
    }, 300);
    this.ok(this.canvas.toDataURL("image/" + this.type), this.canvas);
},

我试着提交一下PR

eachmawzw avatar Oct 19 '18 04:10 eachmawzw