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

修复问题:首次 hover 到 dataIndex = 0 的区块不会高亮 #522

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

curly210102
Copy link

  • 问题描述:首次 hover 到 dataIndex = 0 的区块不会高亮
  • 问题分析:_lastHoverDataIndex 默认值为 0,代表初始 hover 区域为 dataIndex = 0 的区块,在 mouseover 逻辑中前后 dataIndex 相等不会执行高亮处理
  • 解决方法:从 _lastHoverDataIndex 的定义上来看,默认状态应该为 -1, 代表 hover 区域为空,这也和 mouseout 中的操作一致
    _onmouseout: function (e) {
    if (e.target) {
    this.downplay(this._lastHoverDataIndex);
    this._lastHoverDataIndex = -1;
    this._polygonMesh.dataIndex = -1;
    }

Closes #520

The hover region in the initial state should be empty

Closes ecomfe#520
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

Successfully merging this pull request may close these issues.

map3D 初始化后,鼠标移动到 data 中的第一块区域不会高亮
1 participant