- const formatCoordinate = function formatCoordinate(coordinate) {
- const sign = Math.sign(coordinate) === 1 ? '' : '-';
- const value = Math.abs(coordinate).toString(16).padStart(4, 0);
- return sign + value;
+ const showPalette = function showPalette(event) {
+ event.preventDefault();
+ dragging = null;
+ document.documentElement.style.setProperty('--palette-x', event.clientX + 'px');
+ document.documentElement.style.setProperty('--palette-y', event.clientY + 'px');
+ shouldShowPalette = true;