
var idTimerAntiPolarization = null;
function startAntiPolarization(that) {

    if (idTimerAntiPolarization != null) {
        clearInterval(idTimerAntiPolarization);
        idTimerAntiPolarization = null;
    }
    idTimerAntiPolarization = setInterval(() => {
        console.log("! startAntiPolarization event");
        that.$setY("antiPolarization", 0);
        setTimeout(() => {
            that.$setY("antiPolarization", -480);
        }, 500);
    }, 5000);
}
function stopAntiPolarization(that) {
    if (idTimerAntiPolarization != null) {
        clearInterval(idTimerAntiPolarization);
        idTimerAntiPolarization = null;
    }
}
//  <div style="left: 0px;width: 480; height: 480;background-color:rgb(0, 0, 0); top:-480;opacity: 0.1;" id="antiPolarization"></div>
module.exports = {
    startAntiPolarization: startAntiPolarization,
    stopAntiPolarization: stopAntiPolarization,

}
