import $ from "jquery"; import render_loader from "../templates/loader.hbs"; export function make_indicator( $outer_container: JQuery, {abs_positioned = false, text}: {abs_positioned?: boolean; text?: string} = {}, ): void { let $container = $outer_container; // TODO: We set white-space to 'nowrap' because under some // unknown circumstances (it happens on Keegan's laptop) the text // width calculation, above, returns a result that's a few pixels // too small. The container's div will be slightly too small, // but that's probably OK for our purposes. $outer_container.css({"white-space": "nowrap"}); $container.empty(); if (abs_positioned) { // Create some additional containers to facilitate absolutely // positioned spinners. const container_id = $container.attr("id")!; let $inner_container = $("