@component-hook/pdf-canvas 0.2.1 → 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -782,7 +782,7 @@ const Ei = () => Up || (Up = { document, window, isTouchSupported: "ontouchstart
|
|
|
782
782
|
const { perfLimitSizeTotal: t } = dt, e = Math.sqrt(t * o);
|
|
783
783
|
return [Math.floor(e), Math.floor(t / e)];
|
|
784
784
|
}
|
|
785
|
-
}(), lg = "6.5.
|
|
785
|
+
}(), lg = "6.5.1";
|
|
786
786
|
function ba() {
|
|
787
787
|
}
|
|
788
788
|
const Qn = Math.PI / 2, pn = 2 * Math.PI, zf = Math.PI / 180, Xe = Object.freeze([1, 0, 0, 1, 0, 0]), Vf = 16, _n = 0.4477152502, et = "center", mt = "left", Ze = "top", cg = "bottom", zt = "right", je = "none", Gf = /\r?\n/, Zm = "moving", dd = "scaling", t0 = "rotating", Yf = "rotate", e0 = "skewing", zh = "resizing", r_ = "modifyPoly", a_ = "modifyPath", ku = "changed", gd = "scale", ze = "scaleX", gs = "scaleY", eh = "skewX", sh = "skewY", Jt = "fill", Ne = "stroke", Mu = "modified", Fa = "json", Hd = "svg", G = new class {
|
|
@@ -2713,12 +2713,12 @@ function R_(o, t, e, s, i) {
|
|
|
2713
2713
|
s = s || {};
|
|
2714
2714
|
const n = this.sizeX || s.cornerSize || i.cornerSize, r = this.sizeY || s.cornerSize || i.cornerSize, a = s.transparentCorners !== void 0 ? s.transparentCorners : i.transparentCorners, h = a ? Ne : Jt, l = !a && (s.cornerStrokeColor || i.cornerStrokeColor);
|
|
2715
2715
|
let u, d = t, g = e;
|
|
2716
|
-
o.save(), o.fillStyle = s.cornerColor || i.cornerColor || "", o.strokeStyle = s.cornerStrokeColor || i.cornerStrokeColor || "", n > r ? (u = n, o.scale(1, r / n), g = e * n / r) : r > n ? (u = r, o.scale(n / r, 1), d = t * r / n) : u = n, o.
|
|
2716
|
+
o.save(), o.fillStyle = s.cornerColor || i.cornerColor || "", o.strokeStyle = s.cornerStrokeColor || i.cornerStrokeColor || "", n > r ? (u = n, o.scale(1, r / n), g = e * n / r) : r > n ? (u = r, o.scale(n / r, 1), d = t * r / n) : u = n, o.beginPath(), o.arc(d, g, u / 2, 0, pn, !1), o[h](), l && o.stroke(), o.restore();
|
|
2717
2717
|
}
|
|
2718
2718
|
function F_(o, t, e, s, i) {
|
|
2719
2719
|
s = s || {};
|
|
2720
2720
|
const n = this.sizeX || s.cornerSize || i.cornerSize, r = this.sizeY || s.cornerSize || i.cornerSize, a = s.transparentCorners !== void 0 ? s.transparentCorners : i.transparentCorners, h = a ? Ne : Jt, l = !a && (s.cornerStrokeColor || i.cornerStrokeColor), u = n / 2, d = r / 2;
|
|
2721
|
-
o.save(), o.fillStyle = s.cornerColor || i.cornerColor || "", o.strokeStyle = s.cornerStrokeColor || i.cornerStrokeColor || "", o.
|
|
2721
|
+
o.save(), o.fillStyle = s.cornerColor || i.cornerColor || "", o.strokeStyle = s.cornerStrokeColor || i.cornerStrokeColor || "", o.translate(t, e);
|
|
2722
2722
|
const g = i.getTotalAngle();
|
|
2723
2723
|
o.rotate(Ht(g)), o["".concat(h, "Rect")](-u, -d, n, r), l && o.strokeRect(-u, -d, n, r), o.restore();
|
|
2724
2724
|
}
|
|
@@ -2908,7 +2908,7 @@ class Yh extends Oi {
|
|
|
2908
2908
|
_renderControls(t) {
|
|
2909
2909
|
let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
2910
2910
|
const { hasBorders: s, hasControls: i } = this, n = E({ hasBorders: s, hasControls: i }, e), r = this.getViewportTransform(), a = n.hasBorders, h = n.hasControls, l = Vt(r, this.calcTransformMatrix()), u = _a(l);
|
|
2911
|
-
t.save(), t.translate(u.translateX, u.translateY), t.lineWidth =
|
|
2911
|
+
t.save(), t.translate(u.translateX, u.translateY), t.lineWidth = this.borderScaleFactor, this.group === this.parent && (t.globalAlpha = this.isMoving ? this.borderOpacityWhenMoving : 1), this.flipX && (u.angle -= 180), t.rotate(Ht(this.group ? u.angle : this.angle)), a && this.drawBorders(t, u, e), h && this.drawControls(t, e), t.restore();
|
|
2912
2912
|
}
|
|
2913
2913
|
drawBorders(t, e, s) {
|
|
2914
2914
|
let i;
|
|
@@ -21937,8 +21937,8 @@ tt.setLayerDimensions;
|
|
|
21937
21937
|
tt.shadow;
|
|
21938
21938
|
tt.version;
|
|
21939
21939
|
const $C = {
|
|
21940
|
-
fabric: "^6.5.
|
|
21941
|
-
"pdfjs-dist": "
|
|
21940
|
+
fabric: "^6.5.1",
|
|
21941
|
+
"pdfjs-dist": "4.8.69"
|
|
21942
21942
|
};
|
|
21943
21943
|
function KC(o) {
|
|
21944
21944
|
return new Promise((t, e) => {
|