antvis/G2

legend、slider、scrollbar 涉及到鼠标拖拽的,都需要设置鼠标样式为手型 #5791

hustcc posted onGitHub

AntV Open Source Contribution Plan(可选)

  • 我同意将这个 Issue 参与 OSCP 计划

Issue 类型

中级任务

任务介绍

image

相关组件的鼠标样式需要设置为手型,需要在代码中找到对应的组件渲染的时候,加上样式,有可能需要到 component 中去修改。

{
  cursor: 'pointer',
}

参考说明

具体调式 DEMO:


【Runtus 认领】

posted by Runtus over 1 year ago

@hustcc 您好,我想确认下,现在是需要把 cursor: grab 改成 cursor: pointer的形式是吗? 除此之外,slider中不同MouseEvent以及位置的不同它的cursor样式也不同,这种的话,是修改哪一部分呢?

posted by Runtus over 1 year ago

@hustcc 您好,我想确认下,现在是需要把 cursor: grab 改成 cursor: pointer的形式是吗? 除此之外,slider中不同MouseEvent以及位置的不同它的cursor样式也不同,这种的话,是修改哪一部分呢?

现在的样式是 grab?但是实际页面上没有效果啊,期望是鼠标移动上去,能告诉用户这个是可以拖拽的。

slider 不同 MouseEvent 和位置 cursor 样式不同是什么意思?

posted by hustcc over 1 year ago

@hustcc 我的操作系统是Macos 14,浏览器是Chrome - 118.0.5993.117

posted by Runtus over 1 year ago

slider 确实在我这里是 ok 的,那 slider 不用处理。但是 scrollbar 和 legend 的在我这里样式不对。

posted by hustcc over 1 year ago

明白了,刚刚看了下,legend样式确实不对,scrollbar的样式只有在click后才会有grab的样式,我这里就对这两部分进行修改,感谢说明

posted by Runtus over 1 year ago

@hustcc 您好,我这边改好后,是直接给component提PR吧,这两处cusror: pointer修复我都没有改G2中的内容。

posted by Runtus over 1 year ago

Fund this Issue

$0.00
Funded

Pull requests