mirror of
https://github.com/maputnik/editor.git
synced 2025-12-07 23:00:01 +00:00
- Use the browsers fetch rather than the request module - base64-loader -> raw-loader - Remove ol3 because it's been broken for a while - Removed old GitHub gist support as it's no longer functional - Removed Mousetrap as we were only using a small part of the functionality - Moved to single js file to make things simplier
13 lines
301 B
JavaScript
13 lines
301 B
JavaScript
import throttle from 'lodash.throttle'
|
|
|
|
|
|
// Throttle for 3 seconds so when a user enables it they don't have to refresh the page.
|
|
const reducedMotionEnabled = throttle(() => {
|
|
return window.matchMedia("(prefers-reduced-motion: reduce)").matches
|
|
}, 3000);
|
|
|
|
|
|
export default {
|
|
reducedMotionEnabled
|
|
}
|