Commit bad876fe authored by lyong's avatar lyong

feat:增加定时颜色变化防止极化

parent 601d2b82
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
<text class="testReturn" id="id_ng" onpress="touchedScreen" onclick="touchedNGButton" style="top: 300;left:14 ;color: #F44236;background-color: #858282;">NG</text> <text class="testReturn" id="id_ng" onpress="touchedScreen" onclick="touchedNGButton" style="top: 300;left:14 ;color: #F44236;background-color: #858282;">NG</text>
<text class="testReturn" id="id_back" onpress="touchedScreen" onclick="touchedBackButton" style="top: 300;left:189;color: #000000;background-color: #858282;">back</text> --> <text class="testReturn" id="id_back" onpress="touchedScreen" onclick="touchedBackButton" style="top: 300;left:189;color: #000000;background-color: #858282;">back</text> -->
<div style="left: 0px;width: 480; height: 480;background-color:rgb(0, 0, 0); top:-480;opacity: 0.1;" id="antiPolarization"></div>
</div> </div>
</html> </html>
...@@ -87,6 +87,7 @@ ...@@ -87,6 +87,7 @@
}, },
/*************** struct ***************/ /*************** struct ***************/
onInit: function () { onInit: function () {
//this.$setImageForceUpdate(true); //this.$setImageForceUpdate(true);
...@@ -96,6 +97,7 @@ ...@@ -96,6 +97,7 @@
this.$enableMouseMoveEvent(true); this.$enableMouseMoveEvent(true);
//console.log(this.$uri + "===========onShow=============") //console.log(this.$uri + "===========onShow=============")
factory_testBurnIn.initFactoryTestBurnIn(this); factory_testBurnIn.initFactoryTestBurnIn(this);
require("factory_antiPolarization.js").startAntiPolarization(this);
}, },
onHide: function () { onHide: function () {
...@@ -111,6 +113,7 @@ ...@@ -111,6 +113,7 @@
}, },
quitEvent: function () { quitEvent: function () {
this.$enableMouseMoveEvent(false); this.$enableMouseMoveEvent(false);
require("factory_antiPolarization.js").stopAntiPolarization(this);
factory_testBurnIn.quitFactoryTestBurnIn(); factory_testBurnIn.quitFactoryTestBurnIn();
}, },
......
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,
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment