Page viewer doesn't draw the Todo small lines template #75
Labels
No labels
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
jfro/rm-analyzer#75
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Refs #51.
Jeremy (Nov 11): todo sync works on the tablet, but a page on our Todo small lines template shows only its strokes in rM-Analyzer's page viewer: no title band, rules, margin or printed boxes. Built-in templates (P Lines small etc.) draw fine.
Why
The viewer draws a template behind the strokes when
Templates.drawn?(page.template)is true, and it looks the drawing up by the page'stemplate.valuefrom the notebook's.content. For built-in templates that's the name ("P Lines small"). Ours reaches the tablet as a Methods-styleTemplateTypecloud item (RmAnalyzer.Todos.Template,Remarkable.NewTemplate), and a page on it doesn't store the plain name we match on (it points at the item, by its id), so the lookup misses and the viewer leaves the template out.Fix
Resolve a page's template value to our drawing when it names the todo template item (its id, or one of our earlier ids), as well as by name, so the viewer draws it under the strokes like a built-in one. OCR stays as it is:
OCR.PageImageleaving the template out is intentional.