mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-19 14:55:31 +00:00
TSK-760: Fix scroll issue for mac (#3173)
Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
parent
cbe0f74250
commit
dd712fcdd7
@ -369,8 +369,12 @@
|
||||
const wheelEvent = (e: WheelEvent) => {
|
||||
e = e || window.event
|
||||
const deltaY = e.deltaY
|
||||
if (deltaY < 0 && autoscroll && scrolling && beforeContent && beforeContent > 0) scrolling = false
|
||||
else if (deltaY > 0 && autoscroll && !scrolling && belowContent && belowContent <= 10) scrolling = true
|
||||
if (deltaY < 0 && autoscroll && scrolling && beforeContent && beforeContent > 0) {
|
||||
scrolling = false
|
||||
} else if (deltaY > 0 && autoscroll && !scrolling && belowContent && belowContent <= 10) {
|
||||
scrolling = true
|
||||
}
|
||||
scrollY += deltaY
|
||||
}
|
||||
|
||||
let observer: IntersectionObserver
|
||||
@ -478,7 +482,14 @@
|
||||
// TODO: Workaround: https://front.hc.engineering/workbench/platform/tracker/TSK-760
|
||||
// In Safari scroll could jump on click, with no particular reason.
|
||||
|
||||
if (scrollY !== 0 && Math.abs(newPos - scrollY) > 100 && divScroll !== undefined && isSafari()) {
|
||||
if (
|
||||
!scrolling &&
|
||||
!isScrolling &&
|
||||
scrollY !== 0 &&
|
||||
Math.abs(newPos - scrollY) > 100 &&
|
||||
divScroll !== undefined &&
|
||||
isSafari()
|
||||
) {
|
||||
divScroll.scrollTop = scrollY
|
||||
}
|
||||
scrollY = divScroll?.scrollTop ?? 0
|
||||
|
@ -24,9 +24,13 @@
|
||||
|
||||
<Card on:close fullSize label={getEmbeddedLabel('Statistics')} okAction={() => {}} okLabel={getEmbeddedLabel('Ok')}>
|
||||
{#if data}
|
||||
{#each Object.entries(data.statistics?.activeSessions) as act}
|
||||
{act[0]}: {act[1]}
|
||||
{/each}
|
||||
<div class="flex-column">
|
||||
{#each Object.entries(data.statistics?.activeSessions) as act}
|
||||
<span class="flex-row-center">
|
||||
{act[0]}: {act[1]}
|
||||
</span>
|
||||
{/each}
|
||||
</div>
|
||||
|
||||
<span class="fs-title flex-row-center">
|
||||
Memory usage: {data.statistics.memoryUsed} / {data.statistics.memoryTotal}
|
||||
|
@ -142,11 +142,15 @@ export async function connect (title: string): Promise<Client | undefined> {
|
||||
await setClient(_client)
|
||||
|
||||
if (me.role === AccountRole.Owner) {
|
||||
let ep = endpoint.replace(/^ws/g, 'http')
|
||||
if (!ep.endsWith('/')) {
|
||||
ep += '/'
|
||||
}
|
||||
setMetadata(ui.metadata.ShowNetwork, (evt: MouseEvent) => {
|
||||
showPopup(
|
||||
ServerStatistics,
|
||||
{
|
||||
endpoint: endpoint.replace(/^ws/g, 'http') + '/' + token
|
||||
endpoint: ep + token
|
||||
},
|
||||
'top'
|
||||
)
|
||||
|
@ -411,9 +411,14 @@ class TSessionManager implements SessionManager {
|
||||
workspace,
|
||||
'hello happen',
|
||||
service.getUser(),
|
||||
'binary:',
|
||||
service.binaryResponseMode,
|
||||
'compression:',
|
||||
service.useCompression,
|
||||
this.workspaces.get(workspace)?.sessions?.size
|
||||
'workspace users:',
|
||||
this.workspaces.get(workspace)?.sessions?.size,
|
||||
'total users:',
|
||||
this.sessions.size
|
||||
)
|
||||
}
|
||||
const helloResponse: HelloResponse = { id: -1, result: 'hello', binary: service.binaryResponseMode }
|
||||
@ -441,7 +446,7 @@ class TSessionManager implements SessionManager {
|
||||
ctx,
|
||||
ws,
|
||||
resp,
|
||||
this.sessions.size < 100 ? 10000 : 101,
|
||||
this.sessions.size < 100 ? 10000 : 1001,
|
||||
service.binaryResponseMode,
|
||||
service.useCompression
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user