// attach event listeners iconDiv.addEventListener('mousedown', (e) => onMouseDown(e, icon)); iconDiv.addEventListener('dblclick', (e) => e.stopPropagation(); onDoubleClickIcon(icon); ); iconDiv.addEventListener('contextmenu', (e) => onIconContextMenu(e, icon));
const divider = document.createElement('div'); divider.className = 'context-menu-divider'; small icons on desktop
Small icons look neater. If you have 30 shortcuts on your desktop, large icons make it look chaotic. Small icons look organized and regimented, creating a sense of order. // attach event listeners iconDiv
Before we fix it, it helps to know why it happens. On Windows, the most common culprit is the "Scroll Wheel" trick. const divider = document.createElement('div')
// ---- initialize icons: build state, load stored positions or default grid ---- function initIcons() // build iconsState from DB iconsState = ICON_DB.map(db => ( id: db.id, name: db.name, emoji: db.emoji, colorTint: db.colorTint, x: 0, y: 0 ));