@egova-mobile/app-media-utils 0.0.4 → 0.0.5
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 +2 -6
- package/dist/index.esm.mjs +2 -6
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -1216,7 +1216,7 @@ function drawGroupedWatermarks(canvas, watermarks, groupPosition) {
|
|
|
1216
1216
|
const tile = buildTile(canvas, watermark);
|
|
1217
1217
|
if (tile) {
|
|
1218
1218
|
tiles.push(tile);
|
|
1219
|
-
totalHeight += tile.size.height +
|
|
1219
|
+
totalHeight += tile.size.height + tile.style.paddingTop + tile.style.paddingBottom;
|
|
1220
1220
|
}
|
|
1221
1221
|
}
|
|
1222
1222
|
if (totalHeight <= 0) {
|
|
@@ -1226,19 +1226,15 @@ 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;
|
|
1230
1229
|
if (groupPosition === "center" /* Center */) {
|
|
1231
1230
|
baseOrigin = new Point(
|
|
1232
1231
|
contentPadding,
|
|
1233
1232
|
Math.round((canvas.height - totalHeight) / 2)
|
|
1234
1233
|
);
|
|
1235
1234
|
} else if (groupPosition === "bottom" /* Bottom */) {
|
|
1236
|
-
tiles.forEach((item) => {
|
|
1237
|
-
titlePadding += item.style.paddingTop + item.style.paddingBottom;
|
|
1238
|
-
});
|
|
1239
1235
|
baseOrigin = new Point(
|
|
1240
1236
|
contentPadding,
|
|
1241
|
-
canvas.height - totalHeight - contentPadding
|
|
1237
|
+
canvas.height - totalHeight - contentPadding
|
|
1242
1238
|
);
|
|
1243
1239
|
} else if (groupPosition === "top" /* Top */) {
|
|
1244
1240
|
baseOrigin = new Point(contentPadding, contentPadding);
|
package/dist/index.esm.mjs
CHANGED
|
@@ -1191,7 +1191,7 @@ function drawGroupedWatermarks(canvas, watermarks, groupPosition) {
|
|
|
1191
1191
|
const tile = buildTile(canvas, watermark);
|
|
1192
1192
|
if (tile) {
|
|
1193
1193
|
tiles.push(tile);
|
|
1194
|
-
totalHeight += tile.size.height +
|
|
1194
|
+
totalHeight += tile.size.height + tile.style.paddingTop + tile.style.paddingBottom;
|
|
1195
1195
|
}
|
|
1196
1196
|
}
|
|
1197
1197
|
if (totalHeight <= 0) {
|
|
@@ -1201,19 +1201,15 @@ 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;
|
|
1205
1204
|
if (groupPosition === "center" /* Center */) {
|
|
1206
1205
|
baseOrigin = new Point(
|
|
1207
1206
|
contentPadding,
|
|
1208
1207
|
Math.round((canvas.height - totalHeight) / 2)
|
|
1209
1208
|
);
|
|
1210
1209
|
} else if (groupPosition === "bottom" /* Bottom */) {
|
|
1211
|
-
tiles.forEach((item) => {
|
|
1212
|
-
titlePadding += item.style.paddingTop + item.style.paddingBottom;
|
|
1213
|
-
});
|
|
1214
1210
|
baseOrigin = new Point(
|
|
1215
1211
|
contentPadding,
|
|
1216
|
-
canvas.height - totalHeight - contentPadding
|
|
1212
|
+
canvas.height - totalHeight - contentPadding
|
|
1217
1213
|
);
|
|
1218
1214
|
} else if (groupPosition === "top" /* Top */) {
|
|
1219
1215
|
baseOrigin = new Point(contentPadding, contentPadding);
|