@libresign/pdf-elements 0.2.4 → 0.2.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/pdf-elements.common.js +25097 -24746
- package/dist/pdf-elements.common.js.map +1 -1
- package/dist/pdf-elements.css +1 -1
- package/dist/pdf-elements.umd.js +25097 -24746
- package/dist/pdf-elements.umd.js.map +1 -1
- package/dist/pdf-elements.umd.min.js +2 -2
- package/dist/pdf-elements.umd.min.js.map +1 -1
- package/package.json +1 -2
- package/src/components/DraggableElement.vue +6 -3
- package/src/components/PDFElements.vue +324 -173
- package/src/components/PDFPage.vue +31 -8
- package/src/index.js +0 -5
- package/src/utils/geometry.js +20 -0
- package/src/utils/measurements.js +16 -0
- package/src/utils/objectStore.js +35 -0
- package/src/utils/pageBounds.js +13 -0
- package/src/utils/zoom.js +8 -0
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@libresign/pdf-elements",
|
|
3
3
|
"description": "PDF viewer with draggable and resizable element overlays for Vue 2",
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.5",
|
|
5
5
|
"author": "LibreCode <contact@librecode.coop>",
|
|
6
6
|
"private": false,
|
|
7
7
|
"main": "dist/pdf-elements.umd.js",
|
|
@@ -31,7 +31,6 @@
|
|
|
31
31
|
"lint:fix": "vue-cli-service lint"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"debounce": "^3.0.0",
|
|
35
34
|
"pdfjs-dist": "^5.4.530",
|
|
36
35
|
"vue": "^2.7.16"
|
|
37
36
|
},
|
|
@@ -189,9 +189,12 @@ export default {
|
|
|
189
189
|
const x = this.object.x + offsetX + resizeOffsetX
|
|
190
190
|
const y = this.object.y + offsetY + resizeOffsetY
|
|
191
191
|
const width = this.object.width + resizeOffsetW
|
|
192
|
+
const toolbarOffset = 60
|
|
193
|
+
const nextTop = y - toolbarOffset
|
|
194
|
+
const top = nextTop < 0 ? (y + 8) : nextTop
|
|
192
195
|
return {
|
|
193
196
|
left: `${(x + width / 2) * scale}px`,
|
|
194
|
-
top: `${
|
|
197
|
+
top: `${top * scale}px`,
|
|
195
198
|
transform: 'translateX(-50%)',
|
|
196
199
|
}
|
|
197
200
|
},
|
|
@@ -467,7 +470,7 @@ export default {
|
|
|
467
470
|
border-radius: 6px;
|
|
468
471
|
padding: 6px 8px;
|
|
469
472
|
box-shadow: 0 4px 12px -2px rgba(0, 0, 0, 0.15), 0 2px 6px -2px rgba(0, 0, 0, 0.1);
|
|
470
|
-
z-index:
|
|
473
|
+
z-index: 5;
|
|
471
474
|
white-space: nowrap;
|
|
472
475
|
}
|
|
473
476
|
.action-btn {
|
|
@@ -513,7 +516,7 @@ export default {
|
|
|
513
516
|
display: block;
|
|
514
517
|
appearance: none;
|
|
515
518
|
cursor: pointer;
|
|
516
|
-
z-index:
|
|
519
|
+
z-index: 5;
|
|
517
520
|
}
|
|
518
521
|
.handle-top-left {
|
|
519
522
|
top: -7px;
|