if (config.bottom && yy > config.bottom - tr.height / 2) {
        yy = config.bottom - tr.height / 2
      }