in src/core/configurableTL.ts [1357:1391]
function initialOpacity(d, tl_layout, prev_tl_layout, tl_representation, prev_tl_representation, tl_scale, prev_tl_scale, checkRadial) {
// If we were segmented at all, or if we were radial at all, then hide it.
const noRadial = (tl_representation !== "Radial" && prev_tl_representation !== "Radial");
const hasRadial = (tl_representation === "Radial" && prev_tl_representation === "Radial");
const passesRepresentationCheck = checkRadial ? hasRadial : noRadial;
if ((tl_layout === "Segmented" && prev_tl_layout === "Segmented") || passesRepresentationCheck) {
return 0;
// If it isn't "active" or wasn't "active"
} else if (globals.prev_active_event_list.indexOf(d.event_id) === -1 || globals.active_event_list.indexOf(d.event_id) === -1) {
// If we are just hiding it, then set opaticy to 0
if (globals.filter_type === "Hide") {
return 0;
} else if (globals.filter_type === "Emphasize") {
// Otherwise if we are not currently active, then return .1, cause we are not in the active list
if (globals.active_event_list.indexOf(d.event_id) === -1) {
return 0.1;
}
// We are in the active list, return 1 to show it at full opacity
return 1;
}
// We are in the active list and we are selected, then show fully.
} else if (globals.active_event_list.indexOf(d.event_id) !== -1 && d.selected) {
return 1;
} else if (globals.active_event_list.indexOf(d.event_id) !== -1) {
if (tl_scale !== prev_tl_scale || tl_layout !== prev_tl_layout || tl_representation !== prev_tl_representation) {
return 0.5;
}
return 1;
} else {
return 0.1;
}
}