@egova-mobile/app-media-utils 0.0.3 → 0.0.4
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.cjs.js +5 -1
- package/dist/index.esm.mjs +5 -1
- package/package.json +11 -10
package/dist/index.cjs.js
CHANGED
|
@@ -1226,15 +1226,19 @@ function drawGroupedWatermarks(canvas, watermarks, groupPosition) {
|
|
|
1226
1226
|
}
|
|
1227
1227
|
const contentPadding = getCanvasScale(canvas, CONTENT_PADDING);
|
|
1228
1228
|
let baseOrigin = new Point(contentPadding, contentPadding);
|
|
1229
|
+
let titlePadding = 0;
|
|
1229
1230
|
if (groupPosition === "center" /* Center */) {
|
|
1230
1231
|
baseOrigin = new Point(
|
|
1231
1232
|
contentPadding,
|
|
1232
1233
|
Math.round((canvas.height - totalHeight) / 2)
|
|
1233
1234
|
);
|
|
1234
1235
|
} else if (groupPosition === "bottom" /* Bottom */) {
|
|
1236
|
+
tiles.forEach((item) => {
|
|
1237
|
+
titlePadding += item.style.paddingTop + item.style.paddingBottom;
|
|
1238
|
+
});
|
|
1235
1239
|
baseOrigin = new Point(
|
|
1236
1240
|
contentPadding,
|
|
1237
|
-
canvas.height - totalHeight - contentPadding
|
|
1241
|
+
canvas.height - totalHeight - contentPadding - titlePadding
|
|
1238
1242
|
);
|
|
1239
1243
|
} else if (groupPosition === "top" /* Top */) {
|
|
1240
1244
|
baseOrigin = new Point(contentPadding, contentPadding);
|
package/dist/index.esm.mjs
CHANGED
|
@@ -1201,15 +1201,19 @@ function drawGroupedWatermarks(canvas, watermarks, groupPosition) {
|
|
|
1201
1201
|
}
|
|
1202
1202
|
const contentPadding = getCanvasScale(canvas, CONTENT_PADDING);
|
|
1203
1203
|
let baseOrigin = new Point(contentPadding, contentPadding);
|
|
1204
|
+
let titlePadding = 0;
|
|
1204
1205
|
if (groupPosition === "center" /* Center */) {
|
|
1205
1206
|
baseOrigin = new Point(
|
|
1206
1207
|
contentPadding,
|
|
1207
1208
|
Math.round((canvas.height - totalHeight) / 2)
|
|
1208
1209
|
);
|
|
1209
1210
|
} else if (groupPosition === "bottom" /* Bottom */) {
|
|
1211
|
+
tiles.forEach((item) => {
|
|
1212
|
+
titlePadding += item.style.paddingTop + item.style.paddingBottom;
|
|
1213
|
+
});
|
|
1210
1214
|
baseOrigin = new Point(
|
|
1211
1215
|
contentPadding,
|
|
1212
|
-
canvas.height - totalHeight - contentPadding
|
|
1216
|
+
canvas.height - totalHeight - contentPadding - titlePadding
|
|
1213
1217
|
);
|
|
1214
1218
|
} else if (groupPosition === "top" /* Top */) {
|
|
1215
1219
|
baseOrigin = new Point(contentPadding, contentPadding);
|
package/package.json
CHANGED
|
@@ -1,10 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@egova-mobile/app-media-utils",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"module": "dist/index.esm.mjs",
|
|
7
7
|
"typings": "dist/index.d.ts",
|
|
8
|
+
"scripts": {
|
|
9
|
+
"clean": "rimraf ./dist",
|
|
10
|
+
"dev": "node ./build.js -w",
|
|
11
|
+
"build:types": "tsc -p ./tsconfig.json --emitDeclarationOnly",
|
|
12
|
+
"build:bundle": "node ./build.js",
|
|
13
|
+
"build": "pnpm clean && pnpm build:bundle && pnpm build:types",
|
|
14
|
+
"release": "zartui-mobile-cli release",
|
|
15
|
+
"prepare": "pnpm build"
|
|
16
|
+
},
|
|
8
17
|
"publishConfig": {
|
|
9
18
|
"access": "public",
|
|
10
19
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -32,13 +41,5 @@
|
|
|
32
41
|
},
|
|
33
42
|
"peerDependencies": {
|
|
34
43
|
"dayjs": "^1.11.8"
|
|
35
|
-
},
|
|
36
|
-
"scripts": {
|
|
37
|
-
"clean": "rimraf ./dist",
|
|
38
|
-
"dev": "node ./build.js -w",
|
|
39
|
-
"build:types": "tsc -p ./tsconfig.json --emitDeclarationOnly",
|
|
40
|
-
"build:bundle": "node ./build.js",
|
|
41
|
-
"build": "pnpm clean && pnpm build:bundle && pnpm build:types",
|
|
42
|
-
"release": "zartui-mobile-cli release"
|
|
43
44
|
}
|
|
44
|
-
}
|
|
45
|
+
}
|