BuddhaNexus / buddhanexus-frontend-next

BuddhaNexus Frontend 2.0
buddhanexus-frontend-next.vercel.app
2 stars 1 forks source link

Text-view ActiveSegment parameter handling #150

Open sebastian-nehrdich opened 1 month ago

sebastian-nehrdich commented 1 month ago

The text-parallels endpoint takes the parameter "active_segment". When that is set, the "page" parameter is ignored and the backend makes sure to return a page that contains the active segment. The frontend then needs to handle the scrolling of the viewport to the active segment. The old backend also highlighted the active segment by putting grey color behind that. Currently it seems to me that when submitting urls with an activeSegment parameter set (i.e. "http://localhost:3000/db/skt/K01vinv05_u/text?selectedSegment=K01vinv05_u%3A805&selectedSegmentIndex=0"), the active_segment parameter in the call to the backend is not set accordingly and the text is just displayed at page 0.