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

发现一个关于hit和显示的bug #229

Open
idoit opened this issue Sep 12, 2018 · 0 comments
Open

发现一个关于hit和显示的bug #229

idoit opened this issue Sep 12, 2018 · 0 comments

Comments

@idoit
Copy link

idoit commented Sep 12, 2018

当我们绘制时,会按照z order从小到大的顺序进行绘制,而现在addplugin就没有对z order进行排序,会导致plugin会先绘制先加入的,再绘制后加入的。
同样的,在hitTest函数中,应该是按照z order从大到小进行判断,如果已经检测到,那么要break。前提是plugins要排序好
for (MDAbsPlugin plugin : plugins) {
if (plugin instanceof IMDHotspot) {
IMDHotspot hotspot = (IMDHotspot) plugin;
MDHitPoint tmpDistance = hotspot.hit(ray);
if (!tmpDistance.isNotHit() && tmpDistance.nearThen(currentDistance)){
hitHotspot = hotspot;
currentDistance = tmpDistance;
break;
}
}
}

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

No branches or pull requests

1 participant