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

Method set_default_style

js/src/Label.ts:152–169  ·  view source on GitHub ↗
(indices)

Source from the content-addressed store, hash-verified

150 }
151
152 set_default_style(indices) {
153 // For all the elements with index in the list indices, the default
154 // style is applied.
155 if (!indices || indices.length === 0) {
156 return;
157 }
158 const elements = this.d3el.selectAll('.element').filter((data, index) => {
159 return indices.indexOf(index) !== -1;
160 });
161 const that = this;
162 elements
163 .style('font-size', (d, i) => {
164 return that.get_element_size(d);
165 })
166 .style('font-weight', this.model.get('font_weight'))
167 .style('text-anchor', this.model.get('align'))
168 .style('fill', this.get_mark_color.bind(this));
169 }
170
171 set_drag_style(d, i, dragged_node) {
172 const dragged_size =

Callers

nothing calls this directly

Calls 1

get_element_sizeMethod · 0.80

Tested by

no test coverage detected