Comments (2)
再问个 v5 animate怎么使用?用v4方法似乎无效
class CustomEdge extends LineEdge {
afterDraw(model, shapeMap, diffData, diffState) {
// get the first shape in the group, it is the edge's path here=
const shape = shapeMap.keyShape;
console.log(shape)
let index = 0;
// Define the animation
shape.animate(
() => {
index++;
if (index > 9) {
index = 0;
}
console.log(index)
const res = {
keyShape: {
lineDash,
lineDashOffset: -index,
stroke: 'rgba(94,205,162,.7)',
lineWidth: 3
}
};
// returns the modified configurations here, lineDash and lineDashOffset here
return res;
},
{
repeat: true, // whether executes the animation repeatly
duration: 3000, // the duration for executing once
},
);
}
}
const Graph = extend(BaseGraph, {
edges: {
'custom-edge': CustomEdge,
},
});
from g6.
目前 5.0 重新设计了开发方式,可以参考最新的代码处理该问题
from g6.
Related Issues (20)
- An error occurs when [email protected] uses the createRoot API of a higher version of React
- graph.updateLayout HOT 1
- How can I make the text of the rect node at the bottom of the G6 tree graph be displayed vertically in the case of compactBox, TB layout, and rect node?
- After the canvas accent color is changed, the minimap accent color remains unchanged HOT 1
- Window.getComputedStyle: Argument 1 is not an object. HOT 2
- The TypeScript type definition of the NodeEvent event object is incomplete HOT 5
- The custom node registerNode rewrites the draw logic, but there is a problem with the actual layout
- Failed to execute 'appendChild' on 'Node': parameter 1 is not of type 'Node'. HOT 4
- G6. There is a styling issue with Minimap
- When using a custom React node, the end position of the created edge is not consistent with the mouse position HOT 2
- After using a custom React node, the layout of the edges is skewed HOT 2
- [Question] How to use G6 5.x to implement table-level and field-level lineage HOT 3
- 5.x: Unknown layout id: fruchtermanGPU cannot use CPU layout
- How do I dynamically add new edges like in 4.x? HOT 1
- [V5] When using antv-dagre layout, you can't scroll down to the middle, you can only drag and drop to the node at the bottom. HOT 6
- In the comboCombined layout, after the dagre direction is changed from rankdir: 'LR' to rankdir: 'TB', and then the combo node is expanded, the position of the combo expansion is still the previous position? HOT 1
- Problems with using the Webgl renderer in the d3-force layout
- Nuxt2 is compiled with the v5 version and the import.meta syntax is not supported HOT 1
- Unusual drawing occurs when there are a lot of polyline type lines
- [v5.0.22]`create-edge`bug
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.