@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/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",
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: `${(y - 60) * scale}px`,
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: 100;
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: 200;
519
+ z-index: 5;
517
520
  }
518
521
  .handle-top-left {
519
522
  top: -7px;