Remove the Util.domMatrixToTransform method

This method is unused in the worker-thread and has only *a single* call-site in the main-thread, which can be trivially replaced with the `getCurrentTransform` helper function.
This commit is contained in:
Jonas Jenwald 2026-05-15 15:07:44 +02:00
parent 69efba1ca2
commit 367f994d94
2 changed files with 2 additions and 5 deletions

View File

@ -14,6 +14,7 @@
*/
import { BBOX_INIT, FeatureTest, Util } from "../shared/util.js";
import { getCurrentTransform } from "./display_utils.js";
import { MathClamp } from "../shared/math_clamp.js";
const FORCED_DEPENDENCY_LABEL = "__forcedDependency";
@ -1121,7 +1122,7 @@ class CanvasImagesTracker {
this.#coords = newCoords;
}
const transform = Util.domMatrixToTransform(ctx.getTransform());
const transform = getCurrentTransform(ctx);
// We want top left, bottom left, top right.
// (0, 0) is the bottom left corner.

View File

@ -709,10 +709,6 @@ class Util {
return `#${this.hexNums[r]}${this.hexNums[g]}${this.hexNums[b]}`;
}
static domMatrixToTransform(dm) {
return [dm.a, dm.b, dm.c, dm.d, dm.e, dm.f];
}
// Apply a scaling matrix to some min/max values.
// If a scaling factor is negative then min and max must be
// swapped.