adaptOptions(zoomLevel) {
    let options = this.options;
    if (zoomLevel === 1) {
      const pastCriteria = this.dispositionPath[0];
      switch (pastCriteria) {
        case "speciality":
          // remove speciality button
          options = options.filter((option) => option !== Disposition.Speciality);
          break;
        case "cabinet":
          // remove cabinet and city button
          options = options.filter((option) =>
            option !== Disposition.Cabinet && option !== Disposition.City
          );
          break;
        case "city":
          // remove city button
          options = options.filter((option) => option !== Disposition.City);
          break;
        default:
          break;
      }
    }
    if (zoomLevel >= 2) {
      // Everything except none button
      options = options.filter((option) => option === Disposition.None);
    }
    UI.keepDispositionOptions(options);
    UI.setDispositionFocus(this.dispositionPath[zoomLevel]);
  }
/**
   * Adapt displayed buttons according to the context
   */
Adapt displayed buttons according to the context
Adapt displayed buttons according to the context
adaptOptions(zoomLevel) {
    let options = this.options;
    if (zoomLevel === 1) {
      const pastCriteria = this.dispositionPath[0];
      switch (pastCriteria) {
        case "speciality":
          options = options.filter((option) => option !== Disposition.Speciality);
          break;
        case "cabinet":
          options = options.filter((option) =>
            option !== Disposition.Cabinet && option !== Disposition.City
          );
          break;
        case "city":
          options = options.filter((option) => option !== Disposition.City);
          break;
        default:
          break;
      }
    }
    if (zoomLevel >= 2) {
      options = options.filter((option) => option === Disposition.None);
    }
    UI.keepDispositionOptions(options);
    UI.setDispositionFocus(this.dispositionPath[zoomLevel]);
  }
adaptOptions ( zoomLevel ) { let options = this . options ; if ( zoomLevel === 1 ) { const pastCriteria = this . dispositionPath [ 0 ] ; switch ( pastCriteria ) { case "speciality" : options = options . filter ( ( option ) => option !== Disposition . Speciality ) ; break ; case "cabinet" : options = options . filter ( ( option ) => option !== Disposition . Cabinet && option !== Disposition . City ) ; break ; case "city" : options = options . filter ( ( option ) => option !== Disposition . City ) ; break ; default : break ; } } if ( zoomLevel >= 2 ) { options = options . filter ( ( option ) => option === Disposition . None ) ; } UI . keepDispositionOptions ( options ) ; UI . setDispositionFocus ( this . dispositionPath [ zoomLevel ] ) ; }
Adapt displayed buttons according to the context
Adapt displayed buttons according to the context
// remove speciality button // remove cabinet and city button // remove city button // Everything except none button