BuddhaNexus / buddhanexus

Backend for the Buddhanexus project
8 stars 2 forks source link

Text-view ActiveSegment parameter handling #283

Open sebastian-nehrdich opened 5 months ago

sebastian-nehrdich commented 5 months 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.