MCPcopy Create free account
hub / github.com/compiler-explorer/compiler-explorer / updateAndCalcTopBarHeight

Function updateAndCalcTopBarHeight

static/utils.ts:43–56  ·  view source on GitHub ↗
(domRoot: JQuery, topBar: JQuery, hideable: JQuery)

Source from the content-addressed store, hash-verified

41}
42
43export function updateAndCalcTopBarHeight(domRoot: JQuery, topBar: JQuery, hideable: JQuery): number {
44 let topBarHeight = 0;
45 if (!topBar.hasClass('d-none')) {
46 hideable.show();
47 const topBarHeightMax = topBar.outerHeight(true) ?? 0;
48 hideable.hide();
49 const topBarHeightMin = topBar.outerHeight(true) ?? 0;
50 topBarHeight = topBarHeightMin;
51 if (topBarHeightMin === topBarHeightMax) {
52 hideable.show();
53 }
54 }
55 return topBarHeight;
56}
57
58export function formatDateTimeWithSpaces(d: Date) {
59 const t = (x: string) => x.slice(-2);

Callers 2

sizeCheckNavHideablesFunction · 0.85
resizeMethod · 0.85

Calls 2

showMethod · 0.45
hideMethod · 0.45

Tested by

no test coverage detected