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

[Bug] 甘特图 taskBar move 和 resize存在bug #3221

Closed
maInfinity opened this issue Dec 27, 2024 · 4 comments · Fixed by #3236
Closed

[Bug] 甘特图 taskBar move 和 resize存在bug #3221

maInfinity opened this issue Dec 27, 2024 · 4 comments · Fixed by #3236
Assignees
Labels
bug Something isn't working

Comments

@maInfinity
Copy link

maInfinity commented Dec 27, 2024

Version

1.14.1

Link to Minimal Reproduction

https://visactor.com/vtable/demo/gantt/gantt-basic

Steps to Reproduce

  1. 设置resizable : fasle时,移动鼠标到taskbar上
  2. move 或 resize taskbar时,事件结束时 taskbar 有至少一端位于表格外侧(即看不见的地方)

Current Behavior

Vtablebug1
vtable bug2

Expected Behavior

  1. 第一种情况不应该报错
  2. 第二种情况需要解决

Environment

- OS:
- Browser:
- Framework:

Any additional comments?

No response

@maInfinity maInfinity added the bug Something isn't working label Dec 27, 2024
@fangsmile
Copy link
Contributor

最新版应该解决了 试一下吧

@fangsmile fangsmile self-assigned this Dec 30, 2024
@maInfinity
Copy link
Author

感谢回复。
《设置resizable : fasle时,移动鼠标到taskbar上》 这个问题已经解决了。

但问题2,move taskbar时,如果taskbar 有部分被移动到表格外侧时(即看不见的地方),仍然会报错:
VM2546:17 Uncaught TypeError: Cannot read properties of undefined (reading 'startDate')
at zH.endMoveTaskBar (eval at p (load-DF70S3rE.js:1:166), :17:941543)
at HTMLDocument.a (eval at p (load-DF70S3rE.js:1:166), :17:932757)

用官方的测试例子,设置版本为最新的1.14.3,仍然会出现上述错误。
具体复现方式可以参考图片
image

@fangsmile
Copy link
Contributor

第2个问题 转换成feature解决掉了 这周会发版本。
当拖拽超出甘特图原本的日期范围后 会自动扩展日期范围,结合taskbar.moveToExtendDateRange 配置 默认开启

@fangsmile fangsmile linked a pull request Dec 30, 2024 that will close this issue
21 tasks
@maInfinity
Copy link
Author

maInfinity commented Dec 31, 2024

感谢回复。请问这周即将发的新版本中,当拖拽超出甘特图原本的日期范围后,如果不希望自动扩展日期范围,而是希望alert一个消息,并且让本次拖拽无效,moveToExtendDateRange这个配置能做到吗。

具体来说:当拖拽超出时间范围后,以下3种情况是否能做到其中之一:

  1. 直接让taskbar 无法拖拽超出时间范围,当拖到时间边缘后,会像撞墙一样无法继续拖动。
  2. 可以拖出时间范围,但是不允许时间轴扩展,同时撤销本次拖动让taskbar回到拖动之前的位置。
  3. 可以拖出时间范围,不允许时间轴扩展,但无法撤销taskbar的move事件。在这种情况下,是否能够保证CHANGE_DATE_RANGE监听事件的正确执行。如果CHANGE_DATE_RANGE事件能够正确监听,我可以通过事件中的拖动后参数手动判断并且重新刷新视图(在提出这个bug issue的时候,由于会出现图中的报错,所以无法正确监听到事件)

再次感谢你们的回复和及时的修复!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants