fix: drop unused html field from renderDeltaPill (#3)
This commit is contained in:
@@ -3,14 +3,11 @@ let pendingPlayerData = null;
|
|||||||
let openPdgaNumber = null;
|
let openPdgaNumber = null;
|
||||||
|
|
||||||
// ── Delta-pill helper ─────────────────────────────
|
// ── Delta-pill helper ─────────────────────────────
|
||||||
// Returns { text, cls, html } — use .text/.cls to update existing DOM elements
|
|
||||||
// safely; .html is available for insertion contexts.
|
|
||||||
function renderDeltaPill(value, extraClass) {
|
function renderDeltaPill(value, extraClass) {
|
||||||
if (value == null) return null;
|
if (value == null) return null;
|
||||||
const cls = value > 0 ? 'up' : value < 0 ? 'down' : 'flat';
|
const cls = value > 0 ? 'up' : value < 0 ? 'down' : 'flat';
|
||||||
const text = value > 0 ? '+' + value : String(value);
|
const text = value > 0 ? '+' + value : String(value);
|
||||||
const extra = extraClass ? ' ' + extraClass : '';
|
return { text, cls };
|
||||||
return { text, cls, html: `<span class="delta-pill ${cls}${extra}">${text}</span>` };
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function setupTooltipsAfterSwap() {
|
function setupTooltipsAfterSwap() {
|
||||||
|
|||||||
Reference in New Issue
Block a user