@egova-mobile/app-media-utils 0.0.1 → 0.0.2
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/image/watermark.d.ts +11 -11
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.mjs +1 -1
- package/package.json +1 -1
|
@@ -15,15 +15,15 @@ export interface WatermarkContextParams {
|
|
|
15
15
|
height: string;
|
|
16
16
|
}
|
|
17
17
|
export declare class WatermarkContext {
|
|
18
|
-
address
|
|
19
|
-
watermarkTime
|
|
20
|
-
humanName
|
|
21
|
-
projectName
|
|
22
|
-
logo
|
|
23
|
-
applicationName
|
|
24
|
-
pixel
|
|
25
|
-
width
|
|
26
|
-
height
|
|
18
|
+
address?: string;
|
|
19
|
+
watermarkTime?: Date;
|
|
20
|
+
humanName?: string;
|
|
21
|
+
projectName?: string;
|
|
22
|
+
logo?: string;
|
|
23
|
+
applicationName?: string;
|
|
24
|
+
pixel?: string;
|
|
25
|
+
width?: string;
|
|
26
|
+
height?: string;
|
|
27
27
|
/**
|
|
28
28
|
* 打水印需要的环境信息
|
|
29
29
|
* @param address
|
|
@@ -41,8 +41,8 @@ export interface WatermarkOptionsParams {
|
|
|
41
41
|
}
|
|
42
42
|
export declare class WatermarkOptions {
|
|
43
43
|
enabled: boolean;
|
|
44
|
-
watermarkConfigString
|
|
45
|
-
context
|
|
44
|
+
watermarkConfigString?: string;
|
|
45
|
+
context?: WatermarkContext;
|
|
46
46
|
/**
|
|
47
47
|
* 水印配置项
|
|
48
48
|
* @param enabled, 是否开启水印
|
package/dist/index.cjs.js
CHANGED
|
@@ -1281,7 +1281,7 @@ function renderWatermark(canvas, options) {
|
|
|
1281
1281
|
if (!options.enabled || options.watermarkConfigString === "no") {
|
|
1282
1282
|
return Promise.resolve(canvas);
|
|
1283
1283
|
}
|
|
1284
|
-
let { watermarkConfigString } = options;
|
|
1284
|
+
let { watermarkConfigString = "" } = options;
|
|
1285
1285
|
if (watermarkConfigString === "default") {
|
|
1286
1286
|
watermarkConfigString = "50$lefttop$50*#*time###25$lefttop*#*date";
|
|
1287
1287
|
}
|
package/dist/index.esm.mjs
CHANGED
|
@@ -1256,7 +1256,7 @@ function renderWatermark(canvas, options) {
|
|
|
1256
1256
|
if (!options.enabled || options.watermarkConfigString === "no") {
|
|
1257
1257
|
return Promise.resolve(canvas);
|
|
1258
1258
|
}
|
|
1259
|
-
let { watermarkConfigString } = options;
|
|
1259
|
+
let { watermarkConfigString = "" } = options;
|
|
1260
1260
|
if (watermarkConfigString === "default") {
|
|
1261
1261
|
watermarkConfigString = "50$lefttop$50*#*time###25$lefttop*#*date";
|
|
1262
1262
|
}
|