We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
在官网中使用webGL引擎 点击节点 节点应该渲染选中的状态 但是有时候渲染出来的效果是错的 https://g6.antv.antgroup.com/examples/behavior/select/#click 代码 import { Graph } from '@antv/g6'; import { Renderer as WebGLRenderer } from '@antv/g-webgl' const data = { nodes: [ { id: 'node1', style: { x: 150, y: 250 } }, { id: 'node2', style: { x: 350, y: 250 } }, { id: 'node3', style: { x: 250, y: 250 } }, ], edges: [], };
const graph = new Graph({ data, renderer: () => new WebGLRenderer(), behaviors: [{ type: 'click-select', multiple: true, trigger: ['shift'] }, 'drag-element'], autoFit: 'center', });
graph.render();
const prompt = document.createElement('div'); prompt.innerHTML = 👉 Press SHIFT to enable multiple selection; prompt.style.position = 'absolute'; const container = document.getElementById('container'); container.appendChild(prompt);
👉 Press SHIFT to enable multiple selection
未点击时 点击时 期望的效果
https://g6.antv.antgroup.com/examples/behavior/select/#click
打开官网https://g6.antv.antgroup.com/examples/behavior/select/#click 将下列代码复制进去
-------------代码分割线---------------- import { Graph } from '@antv/g6'; import { Renderer as WebGLRenderer } from '@antv/g-webgl' const data = { nodes: [ { id: 'node1', style: { x: 150, y: 250 } }, { id: 'node2', style: { x: 350, y: 250 } }, { id: 'node3', style: { x: 250, y: 250 } }, ], edges: [], };
const prompt = document.createElement('div'); prompt.innerHTML = 👉 Press SHIFT to enable multiple selection; prompt.style.position = 'absolute'; const container = document.getElementById('container'); container.appendChild(prompt); -------------代码分割线----------------
点击节点 就复现了
🆕 5.x
The text was updated successfully, but these errors were encountered:
元素为矩形时
未点击时
点击时
Sorry, something went wrong.
No branches or pull requests
Describe the bug / 问题描述
在官网中使用webGL引擎 点击节点 节点应该渲染选中的状态 但是有时候渲染出来的效果是错的
https://g6.antv.antgroup.com/examples/behavior/select/#click
代码
import { Graph } from '@antv/g6';
import { Renderer as WebGLRenderer } from '@antv/g-webgl'
const data = {
nodes: [
{ id: 'node1', style: { x: 150, y: 250 } },
{ id: 'node2', style: { x: 350, y: 250 } },
{ id: 'node3', style: { x: 250, y: 250 } },
],
edges: [],
};
const graph = new Graph({
data,
renderer: () => new WebGLRenderer(),
behaviors: [{ type: 'click-select', multiple: true, trigger: ['shift'] }, 'drag-element'],
autoFit: 'center',
});
graph.render();
const prompt = document.createElement('div');
prompt.innerHTML =
👉 Press SHIFT to enable multiple selection
;prompt.style.position = 'absolute';
const container = document.getElementById('container');
container.appendChild(prompt);
未点击时
![Image](https://private-user-images.githubusercontent.com/100757902/411831856-a43ef145-9ab1-4769-a92f-4cf045cb205a.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkyNzQxMjMsIm5iZiI6MTczOTI3MzgyMywicGF0aCI6Ii8xMDA3NTc5MDIvNDExODMxODU2LWE0M2VmMTQ1LTlhYjEtNDc2OS1hOTJmLTRjZjA0NWNiMjA1YS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjExJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxMVQxMTM3MDNaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1kZGIzYjE0MmM4ZDhjNTA0YTg4ZTA4NTYwMTFhZjEzZGFkOTY1OWI0M2M1YTFlNTRiZmIzMjQ1ZWE0NmI3ZTAyJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.c-BUidzLjPdtIo0IwpqJg9tlSdOvg2rgRW4T6rzs6KQ)
![Image](https://private-user-images.githubusercontent.com/100757902/411831928-ece13a78-2279-4a3d-99ee-c8164904e194.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkyNzQxMjMsIm5iZiI6MTczOTI3MzgyMywicGF0aCI6Ii8xMDA3NTc5MDIvNDExODMxOTI4LWVjZTEzYTc4LTIyNzktNGEzZC05OWVlLWM4MTY0OTA0ZTE5NC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjExJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxMVQxMTM3MDNaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1kMzc1MzM3YWM4ODNjMTU2ZjExNmU3NjFhY2UwNjAyNWM2ZjUzMWI4OGZiYjQwNTQ0NWM0OTg1ODJhMmEzYjViJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.cq89YX16mxB-_u2e4M_CXHSBuwsaOoP_QQ949eR0PG8)
![Image](https://private-user-images.githubusercontent.com/100757902/411832039-3388dec6-563b-4881-85de-f378f3e21d14.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkyNzQxMjMsIm5iZiI6MTczOTI3MzgyMywicGF0aCI6Ii8xMDA3NTc5MDIvNDExODMyMDM5LTMzODhkZWM2LTU2M2ItNDg4MS04NWRlLWYzNzhmM2UyMWQxNC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjExJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxMVQxMTM3MDNaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT05ZDllOGE0ODU4M2Y5YWRiOTM2Mjc1ZTQ2ZDMwOTZlYTYyNzlmZDE4MGJiMGQyNjIxNjg4MGFiYmM3ZWM5MjIxJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.Sfa03ERMRD1IwrdedNtMmjN4nKzXBuHrmUS-GifxUMU)
点击时
期望的效果
Reproduction link / 复现链接
https://g6.antv.antgroup.com/examples/behavior/select/#click
Steps to Reproduce the Bug or Issue / 重现步骤
打开官网https://g6.antv.antgroup.com/examples/behavior/select/#click
将下列代码复制进去
-------------代码分割线----------------
import { Graph } from '@antv/g6';
import { Renderer as WebGLRenderer } from '@antv/g-webgl'
const data = {
nodes: [
{ id: 'node1', style: { x: 150, y: 250 } },
{ id: 'node2', style: { x: 350, y: 250 } },
{ id: 'node3', style: { x: 250, y: 250 } },
],
edges: [],
};
const graph = new Graph({
data,
renderer: () => new WebGLRenderer(),
behaviors: [{ type: 'click-select', multiple: true, trigger: ['shift'] }, 'drag-element'],
autoFit: 'center',
});
graph.render();
const prompt = document.createElement('div');
prompt.innerHTML =
👉 Press SHIFT to enable multiple selection
;prompt.style.position = 'absolute';
const container = document.getElementById('container');
container.appendChild(prompt);
-------------代码分割线----------------
点击节点 就复现了
Version / 版本
🆕 5.x
OS / 操作系统
Browser / 浏览器
The text was updated successfully, but these errors were encountered: