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

Method set_default_style

js/src/GridHeatMap.ts:273–293  ·  view source on GitHub ↗
(indices, elements)

Source from the content-addressed store, hash-verified

271 }
272
273 set_default_style(indices, elements) {
274 // For all the elements with index in the list indices, the default
275 // style is applied.
276 if (
277 !indices ||
278 (indices.length === 0 && (!elements || elements.length === 0))
279 ) {
280 return;
281 }
282 elements =
283 !elements || elements.length === 0
284 ? this.filterCellsByNum(this.indicesToCellNums(indices))
285 : elements;
286 const stroke = this.model.get('stroke');
287 const opacity = this.model.get('opacity');
288
289 elements
290 .style('fill', (d) => this.get_element_fill(d))
291 .style('opacity', opacity)
292 .style('stroke', stroke);
293 }
294
295 clear_style(style_dict, indices?, elements?) {
296 // Function to clear the style of a dict on some or all the elements of the

Callers 3

apply_stylesMethod · 0.95
style_updatedMethod · 0.95
resetSelectionMethod · 0.95

Calls 3

filterCellsByNumMethod · 0.95
indicesToCellNumsMethod · 0.95
get_element_fillMethod · 0.95

Tested by

no test coverage detected