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

Function apply_styles

js/src/ScatterBase.ts:546–564  ·  view source on GitHub ↗
(style_arr?)

Source from the content-addressed store, hash-verified

544 }
545
546 apply_styles(style_arr?) {
547 if (style_arr === undefined || style_arr == null) {
548 style_arr = [
549 this.selected_style,
550 this.unselected_style,
551 this.hovered_style,
552 this.unhovered_style,
553 ];
554 }
555 super.apply_styles([style_arr]);
556
557 const all_indices = _.range(this.model.mark_data.length);
558
559 this.set_style_on_elements(this.hovered_style, this.hovered_index);
560 const unhovered_indices = !this.hovered_index
561 ? []
562 : _.difference(all_indices, this.hovered_index);
563 this.set_style_on_elements(this.unhovered_style, unhovered_indices);
564 }
565
566 clear_style(style_dict, indices) {
567 // Function to clear the style of a dict on some or all the elements of the

Callers

nothing calls this directly

Calls 3

rangeMethod · 0.80
apply_stylesMethod · 0.45
set_style_on_elementsMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…