mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-10 02:05:37 +02:00
[api-minor] Refactor/simplify the PDFObject
class
First of all, note how there's currently *two* methods for checking if a certain object exists, which seems completely unwarranted. Furthermore, the rarely used `getData` method was removed and its only callsite changed to use a combination of `PDFObjects.{has, get}` instead. Finally, the methods were rearranged slightly, to bring the most important ones (for an API user) to the top of the class.
This commit is contained in:
parent
d32321d84f
commit
60da2d882b
3 changed files with 11 additions and 25 deletions
|
@ -810,7 +810,7 @@ var CanvasGraphics = (function CanvasGraphicsClosure() {
|
|||
|
||||
// If the promise isn't resolved yet, add the continueCallback
|
||||
// to the promise and bail out.
|
||||
if (!objsPool.isResolved(depObjId)) {
|
||||
if (!objsPool.has(depObjId)) {
|
||||
objsPool.get(depObjId, continueCallback);
|
||||
return i;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue