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

工具管理类代码设计梳理和优化 #5

Open
F-star opened this issue Apr 29, 2021 · 1 comment
Open

工具管理类代码设计梳理和优化 #5

F-star opened this issue Apr 29, 2021 · 1 comment
Assignees
Labels
Milestone

Comments

@F-star
Copy link
Owner

F-star commented Apr 29, 2021

在实现绘制钢笔工具的预测曲线时,需要一个全新的非拖拽状态的移动事件,暂定为方法名为 moveNoPressed,在尝试往 toolManage.ts 文件添加这个功能代码时,发现代码的逻辑已经有些看不懂了,而且貌似也不好加这个新的方法。

于是决定梳理和重构一番。

@F-star F-star added the feature label Apr 29, 2021
@F-star F-star added this to the 0.2.0 milestone Apr 29, 2021
@F-star F-star self-assigned this Apr 29, 2021
@F-star
Copy link
Owner Author

F-star commented May 6, 2021

工具的管理都放在 toolManager 类下。该类负责工具相关的所有操作,主要有:

  • 设置当前工具(即工具的切换)
  • 工具切换的钩子事件(UI 层需要用到,如高亮切换的工具对应的图标)
  • 启动事件绑定的方法(这里会进行鼠标事件的监听,主要是这里的逻辑比较复杂,需要进行梳理重构)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant