MCPcopy Index your code
hub / github.com/bqplot/bqplot / tick

Method tick

js/src/Graph.ts:728–758  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

726 }
727
728 private tick() {
729 const link_type = this.model.get('link_type');
730
731 this.nodes.attr('transform', (d: NodeData) => {
732 return `translate(${d.x},${d.y})`;
733 });
734
735 // move rects to center since x, y of rect is at the corner
736 this.nodes.select('rect').attr('transform', (d: NodeData) => {
737 return `translate(${-d.shape_attrs.width / 2},${
738 -d.shape_attrs.height / 2
739 })`;
740 });
741
742 let link_path_func = this.linkArc;
743 switch (link_type) {
744 case 'arc':
745 link_path_func = this.linkArc;
746 break;
747 case 'line':
748 link_path_func = this.linkLine;
749 break;
750 case 'slant_line':
751 link_path_func = this.linkSlantLine;
752 break;
753 default:
754 link_path_func = this.linkArc;
755 }
756
757 this.links.attr('d', link_path_func.bind(this));
758 }
759
760 set_default_style(indices) {}
761

Callers 2

updatePositionMethod · 0.95
drawMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected