🔐 Sid Gifari File Manager Pro
v8.0.5 | 2026-08-07 02:39:46 | PHP 8.2.32
📂
/ (Root)
/
home
/
eliteewa
/
public_html
/
wp-content
/
themes
/
blocksy
/
static
/
js
/
options
/
helpers
📍 /home/eliteewa/public_html/wp-content/themes/blocksy/static/js/options/helpers
🔄 Refresh
✏️
Editing: getNumericKeyboardEvents.js
Writable
const round = (value, decimalPlaces = 1) => { const multiplier = Math.pow(10, decimalPlaces) const rounded = Math.round(value * multiplier + Number.EPSILON) / multiplier return rounded } export const getNumericKeyboardEvents = ({ value, onChange, blockDecimal = false, handleHorizontal = false, }) => { return { onKeyDown: (e) => { if (blockDecimal) { if (e.key === '.' || e.key === ',') { e.preventDefault() } } let step = 1 let decimalPlaces = 0 step = e.shiftKey ? step * 10 : step /** * Arrow up or right */ if (e.keyCode === 38 || (handleHorizontal && e.keyCode === 39)) { e.preventDefault() onChange(parseFloat(value) + step) } /** * Arrow down or left */ if (e.keyCode === 40 || (handleHorizontal && e.keyCode === 37)) { e.preventDefault() onChange(parseFloat(value) - step) } }, } }
💾 Save Changes
❌ Cancel