From: Ian Jackson Date: Wed, 14 Oct 2020 00:37:06 +0000 (+0100) Subject: log scroll to bottom add some debug - rename vars nfc X-Git-Tag: otter-0.2.0~654 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=f2936b1c68a8ef165515364ce57772260ce0bf8c;p=otter.git log scroll to bottom add some debug - rename vars nfc Signed-off-by: Ian Jackson --- diff --git a/templates/script.ts b/templates/script.ts index ed79894c..5b83cb8d 100644 --- a/templates/script.ts +++ b/templates/script.ts @@ -790,10 +790,10 @@ function add_log_message(msg_html: string) { // rejected // https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API (() => { - let le = lastent.getBoundingClientRect()!.bottom; - let ld = logdiv.getBoundingClientRect()!.bottom; - console.log("ADD_LOG_MESSAGE bboxes: le, bb", le, ld); - return le > ld; + let le_bot = lastent.getBoundingClientRect()!.bottom; + let ld_bot = logdiv.getBoundingClientRect()!.bottom; + console.log("ADD_LOG_MESSAGE bboxes: le, bb", le_bot, ld_bot); + return le_bot > ld_bot; })(); console.log('ADD LOG MESSAGE ',in_scrollback, msg_html);