mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-10-09 16:59:43 +02:00
refactor(tiles): the picker's position comes from its stylesheet alone
openTilePicker set `position: fixed` inline, which .tile-picker-menu already declares; the inline copy (carried over from the split picker, whose menu has the same rule) is gone. The top/right offsets under the Tiles button stay inline, since they are measured. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -452,8 +452,8 @@ Object.assign(CodemanApp.prototype, {
|
|||||||
document.body.appendChild(menu);
|
document.body.appendChild(menu);
|
||||||
const btn = document.querySelector('.btn-tile-grid');
|
const btn = document.querySelector('.btn-tile-grid');
|
||||||
if (btn?.getBoundingClientRect) {
|
if (btn?.getBoundingClientRect) {
|
||||||
|
// Under the Tiles button (.tile-picker-menu is position: fixed).
|
||||||
const rect = btn.getBoundingClientRect();
|
const rect = btn.getBoundingClientRect();
|
||||||
menu.style.position = 'fixed';
|
|
||||||
menu.style.top = `${rect.bottom + 4}px`;
|
menu.style.top = `${rect.bottom + 4}px`;
|
||||||
menu.style.right = `${window.innerWidth - rect.right}px`;
|
menu.style.right = `${window.innerWidth - rect.right}px`;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user