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

希望能添加个锁,避免绘制 #38

Open
mahy50 opened this issue Aug 11, 2021 · 2 comments
Open

希望能添加个锁,避免绘制 #38

mahy50 opened this issue Aug 11, 2021 · 2 comments

Comments

@mahy50
Copy link

mahy50 commented Aug 11, 2021

有时候可能会需要锁主canvas, 不让绘制。

 <canvas
    :ref="domId"
    class="app-sign-canvas"
    :id="domId"
    @mousedown.prevent.stop="(e) => !lock && handleMousedown(e)"
    @mousemove.prevent.stop="(e) => !lock && handleMousemove(e)"
    @mouseup.prevent.stop="(e) => !lock && handleMouseup(e)"
    @mouseleave.prevent.stop="(e) => !lock && handleMouseleave(e)"
    @touchstart.prevent.stop="(e) => !lock && handleTouchstart(e)"
    @touchmove.prevent.stop="(e) => !lock && handleTouchmove(e)"
    @touchend.prevent.stop="(e) => !lock && handleTouchend(e)"
  >
    您的浏览器不支持canvas技术,请升级浏览器!
  </canvas>
props: {
  lock: {
    type: [Boolean],
    default: false,
  },
},
@langyuxiansheng
Copy link
Owner

感谢反馈,这段时间忙完了来加功能,我已经一个月没休息了。。。

@langyuxiansheng
Copy link
Owner

最近开始逐渐修复这些bug, 开始提上日程了。

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

2 participants