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

[g-plugin-dragndrop] WebGL 下未触发 dragenter 事件 #1094

Closed
xiaoiver opened this issue Jul 20, 2022 · 0 comments
Closed

[g-plugin-dragndrop] WebGL 下未触发 dragenter 事件 #1094

xiaoiver opened this issue Jul 20, 2022 · 0 comments
Assignees
Labels

Comments

@xiaoiver
Copy link
Contributor

xiaoiver commented Jul 20, 2022

node 移入 droppable 区域未触发 dragenter 事件:
https://g-next.antv.vision/zh/examples/plugins#dragndrop-group

解决方案是使用 elementsFromPoint 得到所有被拾取到的图形,排除掉顶层正在拖拽的图形:

const elementsBelow = await document.elementsFromPoint(point[0], point[1]);
// prevent from picking the dragging element
const elementBelow = elementsBelow[elementsBelow.indexOf(target) + 1];
xiaoiver added a commit that referenced this issue Jul 25, 2022
…1105)

* fix: account for special attribute when cloning custom element #1095

* fix: update [email protected] to use latest WGSL syntax #1103

* fix: use elementsFromPoint for picking droppable element  #1094

* fix: use a temporary vec3 when calling setPosition to prevent alloc vec3 too often

Co-authored-by: yuqi.pyq <[email protected]>
@xiaoiver xiaoiver self-assigned this Jun 7, 2023
@xiaoiver xiaoiver added the bug label Jun 14, 2023
xiaoiver added a commit that referenced this issue Jun 14, 2023
* fix: WebGPU HAL & handle lost context #863 & #1362

* fix: wait for context lost promise

* fix: create renderer3d component in picking plugin #1094

* feat: add onContextLost callback to constructor options of WebGL & WebGPU renderer #1362

* fix: copy glsl_wgsl_compiler_bg.wasm to dist dir of g-webgpu #1369
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

1 participant