(indices, elements)
| 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 |
no test coverage detected