Comments (4)
目测是自定义节点的锚点位置导致的,一般节点是以中心位置定位的,矩形节点使用了左上角来进行定位,导致 focus 看起来不在画布中心
from g6.
目测是自定义节点的锚点位置导致的,一般节点是以中心位置定位的,矩形节点使用了左上角来进行定位,导致 focus 看起来不在画布中心
请问怎么修改自定义节点的这个锚点呢?
from g6.
目测是自定义节点的锚点位置导致的,一般节点是以中心位置定位的,矩形节点使用了左上角来进行定位,导致 focus 看起来不在画布中心
请问怎么修改自定义节点的这个锚点呢?
给每一个shape的x、y增加一个-w / 2、-h / 2的偏移量
from g6.
目测是自定义节点的锚点位置导致的,一般节点是以中心位置定位的,矩形节点使用了左上角来进行定位,导致 focus 看起来不在画布中心
请问怎么修改自定义节点的这个锚点呢?
给每一个shape的x、y增加一个-w / 2、-h / 2的偏移量
已解决,感谢大佬
from g6.
Related Issues (20)
- graph disappers ( "@antv/g6": "^4.8.5",) HOT 2
- 使用addItem("combo")会导致已存在于combo中的节点闪烁
- [4.8.24] 自定义节点动画问题
- vue2 "@antv/g6": "^4.8.24" ReferenceError: exports is not defined
- 如何实现自定义拖动事件像拖动canvas的效果?
- Vitepress build Error [ERR_REQUIRE_ESM]: require() of ES Module
- 【v5】节点/边/组合如何获取元素数据 HOT 2
- 【V5】 参照示例使用Polyline 折线控制台报错,图正常 HOT 1
- 【V5】Contextmenu插件点击菜单无响应 HOT 4
- 【v4】jsx自定义节点时x坐标相同但会偏移
- 在ts中导入@antv/g6 v5时报错 HOT 1
- antvis / G6 v5.0无法配置label样式 HOT 1
- 想通过特定上下文控制scroll-canvas,其它默认behavior有shouldBegin、shouldUpdate属性,但scroll-canvas没有
- 地铁范例无法运行 HOT 1
- 自定义节点如何让主节点下通过addShape添加的图形支持create-edge
- node:dragleave事件在节点内drag时频繁触发 HOT 2
- [V5] React自定义节点缩放后再进行拖拽,连线位置错误 HOT 1
- node:click event does not provide information about edges connected to the node. HOT 1
- removeNodeData bug HOT 2
- drag-canvas and brush select do not work properly together. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from g6.