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

Method set_style_on_elements

js/src/GridHeatMap.ts:253–271  ·  view source on GitHub ↗
(style, indices, elements)

Source from the content-addressed store, hash-verified

251 }
252
253 set_style_on_elements(style, indices, elements) {
254 // If the index array is undefined or of length=0, exit the
255 // function without doing anything
256 if (
257 !indices ||
258 (indices.length === 0 && (!elements || elements.length === 0))
259 ) {
260 return;
261 }
262 // Also, return if the style object itself is blank
263 if (Object.keys(style).length === 0) {
264 return;
265 }
266 elements =
267 !elements || elements.length === 0
268 ? this.filterCellsByNum(this.indicesToCellNums(indices))
269 : elements;
270 applyStyles(elements, style);
271 }
272
273 set_default_style(indices, elements) {
274 // For all the elements with index in the list indices, the default

Callers 2

apply_stylesMethod · 0.95
style_updatedMethod · 0.95

Calls 3

filterCellsByNumMethod · 0.95
indicesToCellNumsMethod · 0.95
applyStylesFunction · 0.90

Tested by

no test coverage detected