An electron-based WIP aesthetic file explorer ^^
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
FileKade/scripts/contextmenu/createcontext.js

7 lines
359 B

module.exports = (e, target, window) => {
window.kade.context = true;
let ctx = document.getElementById('ctx');
ctx.style.display = 'block';
3 years ago
ctx.style.left = `${Math.min(e.pageX, (window.innerWidth - (ctx.clientWidth + 2)))}px`;
ctx.style.top = `${Math.min(e.pageY, ((window.innerHeight + window.scrollY) - (ctx.clientHeight + 2)))}px`;
};