Skip to content

Commit 49c4689

Browse files
fixup! Add logic to track rendering area of various PDF ops
Fix linting
1 parent 395be2b commit 49c4689

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

src/display/canvas.js

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -58,14 +58,6 @@ const MAX_SIZE_TO_COMPILE = 1000;
5858

5959
const FULL_CHUNK_HEIGHT = 16;
6060

61-
function allValues(obj) {
62-
const values = [];
63-
for (const key in obj) {
64-
values.push(obj[key]);
65-
}
66-
return values;
67-
}
68-
6961
/**
7062
* Overrides certain methods on a 2d ctx so that when they are called they
7163
* will also call the same method on the destCtx. The methods that are
@@ -619,7 +611,9 @@ class CanvasExtraStateDependenciesRecorder extends CanvasExtraState {
619611
}
620612

621613
takeDependencies() {
622-
if (this._dependencies.size === 0) return;
614+
if (this._dependencies.size === 0) {
615+
return undefined;
616+
}
623617

624618
const arr = Array.from(this._dependencies);
625619
this._dependencies.clear();

src/display/canvas_recorder.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,9 @@ export class CanvasRecorder {
268268
// console.warn(`Untracked call to ${name}`);
269269
this.#unknown();
270270
}
271-
if (deps) this.#registerDependencies(deps);
271+
if (deps) {
272+
this.#registerDependencies(deps);
273+
}
272274
return this.#ctx[name](...args);
273275
};
274276
}

0 commit comments

Comments
 (0)