Replaces scroll_fraction-only position tracking with element-based
anchors ("{index}:{innerFraction}"). Position is now stable across
font size changes and different screen sizes. A ResizeObserver
restores the anchor on viewport/orientation changes.
Falls back to scroll_fraction for books without a saved anchor.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
16 lines
385 B
Python
16 lines
385 B
Python
from django.db import migrations, models
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
dependencies = [
|
|
('books', '0002_ebookbookmarks_ebookhighlights'),
|
|
]
|
|
|
|
operations = [
|
|
migrations.AddField(
|
|
model_name='ebookprogress',
|
|
name='position_anchor',
|
|
field=models.CharField(blank=True, default='', max_length=30),
|
|
),
|
|
]
|