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

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

Open
dongnaebi opened this issue Dec 27, 2017 · 2 comments
Open

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

dongnaebi opened this issue Dec 27, 2017 · 2 comments

Comments

@dongnaebi
Copy link

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

@AzronChan
Copy link

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

@eachmawzw
Copy link
Contributor

这个方案可以把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

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

3 participants