mirror of
https://github.com/bitcoinresearchkit/brk.git
synced 2026-06-11 07:23:32 -07:00
heatmaps: part 8
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { createLabeledInput, createSpanName } from "../dom.js";
|
||||
import { createLabeledInput, createSpan, createSpanName } from "../dom.js";
|
||||
import { stringToId } from "../format.js";
|
||||
|
||||
/** @param {HTMLElement} el */
|
||||
@@ -27,8 +27,7 @@ export function createLegend() {
|
||||
element.append(scroller);
|
||||
captureScroll(scroller);
|
||||
|
||||
const separator = window.document.createElement("span");
|
||||
separator.textContent = "|";
|
||||
const separator = createSpan("|");
|
||||
captureScroll(separator);
|
||||
|
||||
return {
|
||||
|
||||
@@ -41,6 +41,15 @@ export function createSpan(text) {
|
||||
return span;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} text
|
||||
*/
|
||||
export function createSmall(text) {
|
||||
const small = window.document.createElement("small");
|
||||
small.textContent = text;
|
||||
return small;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} name
|
||||
*/
|
||||
@@ -335,9 +344,7 @@ export function createSelect({
|
||||
|
||||
const remaining = choices.length - 1;
|
||||
if (remaining > 0) {
|
||||
const small = window.document.createElement("small");
|
||||
small.textContent = `+${remaining}`;
|
||||
element.append(small);
|
||||
element.append(createSmall(`+${remaining}`));
|
||||
element.append(createSpan("↓"));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user