/*------------------------ 
Backend related javascript
------------------------*/

/**
 * HELPER COMMENT START
 * 
 * This file contains all of the backend related javascript. 
 * With backend, it is meant the WordPress admin area.
 * 
 * You can add the localized variables in here as followed: rdgblocks.plugin_name
 * These variables are defined within the localization function in the following file:
 * core/includes/classes/class-rdg-blocks-run.php
 * 
 * HELPER COMMENT END
 */


//Adjust block hero size
function setVw() {
    let vw = (document.documentElement.clientWidth + 8.4) / 100;
    document.documentElement.style.setProperty('--vw', `${vw}px`);
}

setVw();
window.addEventListener('resize', setVw);