MCPcopy Create free account
hub / github.com/bqplot/bqplot / update_dots_xy

Method update_dots_xy

js/src/Lines.ts:723–750  ·  view source on GitHub ↗
(animate)

Source from the content-addressed store, hash-verified

721 }
722
723 update_dots_xy(animate): void {
724 if (this.model.get('marker')) {
725 const xScale = this.scales.x,
726 yScale = this.scales.y;
727 const animationDuration =
728 animate === true ? this.parent.model.get('animation_duration') : 0;
729 const dots = this.d3el.selectAll('.curve').selectAll('.dot');
730
731 dots
732 .transition('update_dots_xy')
733 .duration(animationDuration)
734 .attr('transform', (d: any) => {
735 return (
736 'translate(' +
737 (xScale.scale(d.x) + xScale.offset) +
738 ',' +
739 (yScale.scale(d.y) + yScale.offset) +
740 ')'
741 );
742 })
743 .attr(
744 'd',
745 this.dot
746 .size(this.model.get('marker_size'))
747 .type(this.model.get('marker'))
748 );
749 }
750 }
751
752 compute_view_padding(): void {
753 //This function sets the padding for the view through the variables

Callers 2

update_line_xyMethod · 0.95
update_markerMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected