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

Method update_position

js/src/Label.ts:107–123  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

105 }
106
107 update_position() {
108 const that = this;
109 const x_scale = this.x_scale;
110 const y_scale = this.y_scale;
111 const x_offset = this.model.get('x_offset'),
112 y_offset = this.model.get('y_offset');
113 this.d3el.selectAll('.object_grp').attr('transform', (d: any) => {
114 return (
115 'translate(' +
116 (x_scale.scale(d.x) + x_scale.offset + x_offset) +
117 ',' +
118 (y_scale.scale(d.y) + y_scale.offset + y_offset) +
119 ')' +
120 that.get_element_rotation(d)
121 );
122 });
123 }
124
125 update_style() {
126 const that = this;

Callers 5

relayoutMethod · 0.95
set_positional_scalesFunction · 0.80
relayoutFunction · 0.80
drawFunction · 0.80

Calls 1

get_element_rotationMethod · 0.80

Tested by

no test coverage detected