dsh-conversation-navigator 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/client.js +2 -4
- package/package.json +1 -1
package/lib/client.js
CHANGED
|
@@ -412,11 +412,9 @@ window.__ModuleLoader__.load({
|
|
|
412
412
|
const vw = document.documentElement.clientWidth || 1000;
|
|
413
413
|
const vh = document.documentElement.clientHeight || 800;
|
|
414
414
|
const sp = document.querySelector("[data-conversation-scroll]");
|
|
415
|
-
const rect = sp !== null ? sp.getBoundingClientRect() : {
|
|
415
|
+
const rect = sp !== null ? sp.getBoundingClientRect() : { top: 60, height: vh - 90 };
|
|
416
416
|
const width = 288;
|
|
417
|
-
|
|
418
|
-
if (left < 12) left = rect.left + 12;
|
|
419
|
-
if (left + width > vw - 8) left = Math.max(8, vw - width - 8);
|
|
417
|
+
const left = Math.max(8, vw - width - 12);
|
|
420
418
|
panel.style.left = Math.round(left) + "px";
|
|
421
419
|
panel.style.top = Math.max(8, Math.round(rect.top + 8)) + "px";
|
|
422
420
|
panel.style.maxHeight = Math.round(Math.min(rect.height - 24, vh - 40)) + "px";
|