public set translations()

in client/src/components/translation-selector/word-scroll-list.ts [57:67]


  public set translations(value: WordTranslation[]|null) {
    this._translations = value;
    this.translationsChanged = true;
    if(this._translations) {
      if(this._defaultSelectedWordIndex < 0) {
        this.selectedWordIndex = Math.floor((this._translations.length - 1) / 2); // select center word (or left of center if even number)
      } else {
        this.selectedWordIndex = this._defaultSelectedWordIndex;
      }
    }
  }