mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-26 10:08:06 +02:00
Improve code structure of the annotation code
This patch improves the code structure of the annotation code. - Create the annotation border style object in the `setBorderStyle` method instead of in the constructor. The behavior is the same as the `setBorderStyle` method is always called, thus a border style object is still always available. - Put all data object manipulation lines in one block in the constructor. This improves readability and maintainability as it is more visible which properties are exposed. - Simplify `appendToOperatorList` by removing the promise capability and removing an unused parameter. - Remove some unnecessary newlines/spaces.
This commit is contained in:
parent
a8279f7d60
commit
8b79becad6
2 changed files with 23 additions and 40 deletions
|
@ -210,7 +210,7 @@ var Page = (function PageClosure() {
|
|||
}
|
||||
|
||||
var annotationsReadyPromise = Annotation.appendToOperatorList(
|
||||
annotations, pageOpList, pdfManager, partialEvaluator, task, intent);
|
||||
annotations, pageOpList, partialEvaluator, task, intent);
|
||||
return annotationsReadyPromise.then(function () {
|
||||
pageOpList.flush(true);
|
||||
return pageOpList;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue