dpot-ui 0.5.10 → 0.5.11
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.
- package/dist/index.es.js +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -25458,7 +25458,7 @@ const ap = {
|
|
|
25458
25458
|
t.title && o === 1 ? o.height = Math.max((t.style || {}).fontSize * 1.5 || 24, e) : o.height = t.rowHeight || e;
|
|
25459
25459
|
}), t.waterText) {
|
|
25460
25460
|
const o = document.createElement("canvas");
|
|
25461
|
-
o.width = t.waterText.length * (parseInt((t.waterStyle || {}).font) || 24) * 1.5, o.height = o.width;
|
|
25461
|
+
o.width = Math.max(t.waterText.length, 5) * (parseInt((t.waterStyle || {}).font) || 24) * 1.5, o.height = o.width;
|
|
25462
25462
|
const s = o.getContext("2d"), a = t.waterStyle || { font: "24px Arial", fillStyle: "rgba(0, 0, 0, 0.1)", textAlign: "center", textBaseline: "middle" };
|
|
25463
25463
|
s.font = a.font, s.fillStyle = a.fillStyle, s.textAlign = a.textAlign, s.textBaseline = a.textBaseline, s.translate(0, 0), s.rotate(-45 * Math.PI / 180), s.fillText(t.waterText, 10, o.height - 10);
|
|
25464
25464
|
const l = o.toDataURL("image/png").replace(/^data:image\/[a-z]+;base64,/, ""), r = i.addImage({ base64: l, extension: "png" });
|