Change toggle update timing to every tick

This commit is contained in:
Beu 2022-03-03 19:19:26 +01:00
parent ce499759e7
commit 58cf83b975

View File

@ -106,7 +106,7 @@ class ToggleInterface extends ScriptFeature
if ($this->keyCode != null || $this->keyName != null) { if ($this->keyCode != null || $this->keyName != null) {
$script->appendGenericScriptLabel(ScriptLabel::KEYPRESS, $this->getKeyPressScriptText()); $script->appendGenericScriptLabel(ScriptLabel::KEYPRESS, $this->getKeyPressScriptText());
} else { } else {
$script->appendGenericScriptLabel(ScriptLabel::TICK, $this->getTickScriptText()); $script->appendGenericScriptLabel(ScriptLabel::LOOP, $this->getLoopScriptText());
} }
return $this; return $this;
} }
@ -156,7 +156,7 @@ if (Event.{$keyProperty} == {$keyValue}) {
* *
* @return string * @return string
*/ */
protected function getTickScriptText() protected function getLoopScriptText()
{ {
$VarIsVisible = $this::VAR_ISVISIBLE; $VarIsVisible = $this::VAR_ISVISIBLE;
$VarWasVisible = $this::VAR_WASVISIBLE; $VarWasVisible = $this::VAR_WASVISIBLE;