Repository navigation
Annotation border styles - #5585
Conversation
44c7126 to
7959f7a
Compare
c0e9b85 to
4d357a9
Compare
|
looks good to me. |
There was a problem hiding this comment.
As I commented in #5218 (diff):
Does every kind of Annotation contain a Border entry? If not, you might want to initialize this lazily instead.
To initialize it lazily, you remove this line and instead add e.g. the following method to the prototype:
get borderStyle() { return shadow(this, 'borderStyle', new AnnotationBorderStyle()); },
There was a problem hiding this comment.
This has been fixed now. Thank you for reminding me about this, I forgot to apply this fix from the previous PR.
20cd84e to
dd55b8a
Compare
dd55b8a to
10778fe
Compare
6ce657a to
7e65b6b
Compare
|
thanks @timvandermeij for picking this up. i thought it landed already. |
There was a problem hiding this comment.
It seems a bit weird to have a get and set that return/take different things. What about:
- In the constructor create the AnnotationBorderStyle and set it to borderStyle
- have setBorderStyle become updateBorderStyle
- remove the getters for border style and access the object directly
There was a problem hiding this comment.
Fixed as per discussion on IRC.
|
Overall looks good, just need to iron the getter/setter stuff. |
5cabc5c to
7f8a4f0
Compare
This patch adds: - Unit tests for the annotation border style class - Regression test (self-made) for the annotation border style class - Documentation generation using JSDoc
7f8a4f0 to
6007a57
Compare
|
/botio-linux preview |
From: Bot.io (Linux)ReceivedCommand cmd_preview from @timvandermeij received. Current queue size: 0 |
|
/botio test |
From: Bot.io (Windows)ReceivedCommand cmd_test from @timvandermeij received. Current queue size: 0 |
From: Bot.io (Linux)ReceivedCommand cmd_test from @timvandermeij received. Current queue size: 0 |
From: Bot.io (Linux)SuccessTotal script time: 18.14 mins
|
From: Bot.io (Windows)SuccessTotal script time: 18.82 mins
|
This PR implements annotation border styles according to the official PDF specification at https://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/pdf_reference_1-7.pdf, section 8.4.3.
Most of the code is rewriting the old code, but there are some minor additions in order to adhere better to the specification. These are:
annotation_helper.js); this improves all ArXiv PDFs such as http://www.cs.columbia.edu/~djhsu/papers/ilovetoconbandits-arxiv.pdf (dashed border on the left) and fixes Hyperlink displays incorrectly #5694 (underline at the top)Unimplemented border styles have been indicated using
warn()so it is clear that these are missing (and there are barely used in PDFs on the web). I have added documentation and unit/regression tests to increase testability of the annotation layer and to avoid regressions.