(style_arr?)
| 286 | } |
| 287 | |
| 288 | apply_styles(style_arr?) { |
| 289 | if (style_arr === undefined || style_arr == null) { |
| 290 | style_arr = [this.selected_style, this.unselected_style]; |
| 291 | } |
| 292 | const all_indices = _.range(this.model.mark_data.length); |
| 293 | for (let i = 0; i < style_arr.length; i++) { |
| 294 | this.clear_style(style_arr[i]); |
| 295 | } |
| 296 | |
| 297 | this.set_default_style(all_indices); |
| 298 | |
| 299 | this.set_style_on_elements( |
| 300 | this.selected_style, |
| 301 | Array.from(this.selected_indices || []) |
| 302 | ); |
| 303 | const unselected_indices = !this.selected_indices |
| 304 | ? [] |
| 305 | : _.difference(all_indices, Array.from(this.selected_indices)); |
| 306 | this.set_style_on_elements(this.unselected_style, unselected_indices); |
| 307 | } |
| 308 | |
| 309 | // Abstract functions which have to be overridden by the specific mark |
| 310 | abstract clear_style(style_dict, indices?, elements?); |
nothing calls this directly
no test coverage detected
searching dependent graphs…