Use addCallbackAndRunD where applicable, which deletes many if(value==undefined) checks

This commit is contained in:
Pieter Vander Vennet 2021-06-30 15:38:14 +02:00
parent d7e421efc9
commit 6576ac36cc
5 changed files with 6 additions and 18 deletions

View file

@ -59,7 +59,7 @@ export default class DirectionInput extends InputElement<string> {
.ConstructElement()
this.value.addCallbackAndRun(rotation => {
this.value.addCallbackAndRunD(rotation => {
const cone = element.getElementsByClassName("direction-svg")[0] as HTMLElement
cone.style.transform = `rotate(${rotation}deg)`;