Add fuzzy file search functionality (#3240)
Co-authored-by: spencrmartin <spencermartin@squareup.com>
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
// Handle window movement and docking detection
|
||||
let isDragging = false;
|
||||
let startX, startY;
|
||||
|
||||
document.addEventListener('mousedown', (e) => {
|
||||
isDragging = true;
|
||||
startX = e.screenX - window.screenX;
|
||||
startY = e.screenY - window.screenY;
|
||||
});
|
||||
|
||||
document.addEventListener('mouseup', () => {
|
||||
if (isDragging) {
|
||||
isDragging = false;
|
||||
// Check for docking with parent window
|
||||
if (window.electronFloating) {
|
||||
window.electronFloating.checkDocking();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// Handle click to focus parent window
|
||||
document.addEventListener('click', (e) => {
|
||||
if (!isDragging && window.electronFloating) {
|
||||
window.electronFloating.focusParent();
|
||||
}
|
||||
});
|
||||
|
||||
console.log('Floating button script loaded');
|
||||
Reference in New Issue
Block a user