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

Method fill_g_colorfill

js/src/Map.ts:443–463  ·  view source on GitHub ↗
(d, j)

Source from the content-addressed store, hash-verified

441 }
442
443 fill_g_colorfill(d, j) {
444 const color_scale = this.scales.color;
445 const idx = this.model.get('selected');
446 const selection = idx ? idx : [];
447 const color_data = this.model.get('color');
448 const colors = this.model.get('colors');
449
450 if (selection.indexOf(d.id) > -1) {
451 return this.model.get('selected_styles').selected_fill;
452 } else if (this.is_object_empty(color_data)) {
453 return colors[d.id] || colors.default_color;
454 } else if (
455 color_data[d.id] === undefined ||
456 color_data[d.id] === null ||
457 color_scale === undefined
458 ) {
459 return colors.default_color;
460 } else {
461 return color_scale.scale(color_data[d.id]);
462 }
463 }
464
465 clear_style() {}
466 compute_view_padding() {}

Callers 5

drawMethod · 0.95
mouseout_handlerMethod · 0.95
reset_selectionMethod · 0.95
change_map_colorMethod · 0.95
update_styleMethod · 0.95

Calls 1

is_object_emptyMethod · 0.95

Tested by

no test coverage detected