From 243613aea176f4eb42887bd01df813a1b129ee8f Mon Sep 17 00:00:00 2001 From: Evert Prants Date: Sun, 3 Apr 2022 17:06:55 +0300 Subject: [PATCH] placement arrow --- src/client/canvas.ts | 4 ++-- src/client/scss/index.scss | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/client/canvas.ts b/src/client/canvas.ts index 933d19a..56b25ca 100644 --- a/src/client/canvas.ts +++ b/src/client/canvas.ts @@ -99,7 +99,7 @@ export class ViewCanvas { this._updateURL(); - if (this._zoom > 40) { + if (this._zoom > 20) { this._getPlacerAt(this._relcursorx, this._relcursory); } } @@ -366,7 +366,7 @@ export class ViewCanvas { private _showPlacerTag(placer: CanvasRecord): void { this._placerTag = $('
'); this._placerTag.innerText = placer.user; - this._placerTag.style.setProperty('--base-size', `${this._zoom / 1.5}px`); + this._placerTag.style.setProperty('--base-size', `${this._zoom / 2}px`); this._placerTag.style.setProperty('--base-scale', `${this._zoom / 100}`); this._cursor.append(this._placerTag); } diff --git a/src/client/scss/index.scss b/src/client/scss/index.scss index 7f6d29e..cae3ac2 100644 --- a/src/client/scss/index.scss +++ b/src/client/scss/index.scss @@ -63,12 +63,13 @@ body { &-placer { position: relative; min-width: 100px; - background: ivory; + background: white; + box-shadow: 0px 1px 8px #5e5e5e; display: block; margin: 0 auto; border-radius: 20px; text-align: center; - padding: 1rem; + padding: 0.5rem; transform-origin: top center; transform: translateY(calc(var(--base-size) * -1)) scale(var(--base-scale)); @@ -76,7 +77,7 @@ body { content: ""; height: 16px; width: 16px; - background: ivory; + background: white; margin: 0 auto; transform: rotate(45deg); position: absolute;