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
import { subStyleProps, Quadratic } from '@antv/g6'; import { Circle, Line } from '@antv/g';
export class FlyMarkerCubic extends Quadratic { getMarkerStyle(attributes) { return { r: 5, fill: '#c3d5f9', offsetPath: this.shapeMap.key, ...subStyleProps(attributes, 'marker') }; } getLineStyle(attributes) { return { stroke: '#c3d5f9', offsetPath: this.shapeMap.key, ...subStyleProps(attributes, 'marker') }; } onCreate() { const marker = this.upsert('marker', Circle, this.getMarkerStyle(this.attributes), this); marker?.animate([{ offsetDistance: 0 }, { offsetDistance: 1 }], { duration: 3000, iterations: Infinity, }); const line = this.upsert('line_style', Line, this.getLineStyle(this.attributes), this); line.animate([{ lineDashOffset: 20 }, { lineDashOffset: 0 }], { duration: 500, iterations: Infinity, }); } }
The text was updated successfully, but these errors were encountered:
自定义的Circle生效了,line未生效
Sorry, something went wrong.
No branches or pull requests
import { subStyleProps, Quadratic } from '@antv/g6';
import { Circle, Line } from '@antv/g';
export class FlyMarkerCubic extends Quadratic {
getMarkerStyle(attributes) {
return { r: 5, fill: '#c3d5f9', offsetPath: this.shapeMap.key, ...subStyleProps(attributes, 'marker') };
}
getLineStyle(attributes) {
return { stroke: '#c3d5f9', offsetPath: this.shapeMap.key, ...subStyleProps(attributes, 'marker') };
}
onCreate() {
const marker = this.upsert('marker', Circle, this.getMarkerStyle(this.attributes), this);
marker?.animate([{ offsetDistance: 0 }, { offsetDistance: 1 }], {
duration: 3000,
iterations: Infinity,
});
const line = this.upsert('line_style', Line, this.getLineStyle(this.attributes), this);
line.animate([{ lineDashOffset: 20 }, { lineDashOffset: 0 }], {
duration: 500,
iterations: Infinity,
});
}
}
The text was updated successfully, but these errors were encountered: