You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here I was trying the following:
class PolylineEdge extends BaseEdge {
getKeyPath(attributes) {
// Retrieve points from the edge's model
const points = attributes.model.points;
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I am trying to construct polyline edge from control points stored in edge attributes.
It is like this edges: [
{
source: '-1',
target: '1',
points: [
{ x: 475, y: 65 },
{ x: 475, y: 85 },
{ x: 366, y: 155 },
{ x: 366, y: 168 }
]
In version 4x it would work like this:
G6.registerEdge('custom-polyline', {
draw(cfg, group) {
const points = cfg.points;
Here I was trying the following:
class PolylineEdge extends BaseEdge {
getKeyPath(attributes) {
// Retrieve points from the edge's model
const points = attributes.model.points;
But it does not work.
Please advise.
Beta Was this translation helpful? Give feedback.
All reactions