SignDawn

Results 60 comments of SignDawn

https://developer.mozilla.org/zh-CN/docs/Web/API/MouseEvent/button 代码基于 mousedown button = 2 实现

基于 ondrop 来实现,event.dataTransfer.getData 只能拿到字符串。 解决方法: 考虑使用 addCaches 来实现,不基于 ondragstart . 其它解决方案应该也有,麻烦提供一个 codesandbox 的 demo

把末端样式配置成默认就可以了 ![image](https://github.com/le5le-com/meta2d.js/assets/48878568/ee05f512-7227-43a4-853c-e85b6abb8c1d) ![image](https://github.com/le5le-com/meta2d.js/assets/48878568/bf2db3b3-993c-4bda-8c85-55871ec876ef)

不确定为什么现在 lineCap (末端样式) 的默认值 不是 butt (默认) 了,而是 square (方形) 了。

可能是这个原因,导致 官方的默认 成了 square 方形。 你可以暂时对圆做一下特殊处理,将圆的 lineCap 更改成默认。(正方形不更改) 后续应该会在图形绘制上来解决这个问题。

![image](https://user-images.githubusercontent.com/48878568/224995224-d473a2d9-4c93-4d44-988b-e0d8459b5a31.png) 这个点是为了应对这种情况的,最小的拐点。

看起来你这样解决也是可以的 问题其实在源码里留了 TODO: 的,如果有时间的话,我会再看一下这个问题 ![image](https://user-images.githubusercontent.com/48878568/221366271-9691df9b-c279-47cb-b67a-d5bf9aebce34.png)

多层 canvas 结构带来的,图片在单独的层,切换到中层或上层即可。 ![image](https://github.com/le5le-com/meta2d.js/assets/48878568/7e0dd27e-4043-4d80-9be9-291e72f3c70a)