@pdfme/ui 1.0.16 → 1.0.17

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,6 +1,6 @@
1
1
  {
2
2
  "name": "@pdfme/ui",
3
- "version": "1.0.16",
3
+ "version": "1.0.17",
4
4
  "author": "hand-dot",
5
5
  "license": "MIT",
6
6
  "keywords": [
@@ -44,6 +44,9 @@ const DeleteButton = ({ activeElements: aes }: { activeElements: HTMLElement[] }
44
44
  fontWeight: 'bold',
45
45
  borderRadius: 2,
46
46
  background: 'rgb(68, 170, 255)',
47
+ display: 'flex',
48
+ alignItems: 'center',
49
+ justifyContent: 'center',
47
50
  }}
48
51
  >
49
52
  <svg
@@ -51,10 +54,10 @@ const DeleteButton = ({ activeElements: aes }: { activeElements: HTMLElement[] }
51
54
  xmlns="http://www.w3.org/2000/svg"
52
55
  fill="none"
53
56
  viewBox="0 0 24 24"
54
- stroke-width="1.5"
57
+ strokeWidth="1.5"
55
58
  stroke="currentColor"
56
59
  >
57
- <path stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12" />
60
+ <path strokeLinecap="round" strokeLinejoin="round" d="M6 18L18 6M6 6l12 12" />
58
61
  </svg>
59
62
  </button>
60
63
  );
package/src/hooks.ts CHANGED
@@ -12,7 +12,8 @@ export const usePrevious = <T>(value: T) => {
12
12
  return ref.current;
13
13
  };
14
14
 
15
- const getScale = (n: number, paper: number) => (n / paper > 1 ? 1 : n / paper);
15
+ const getScale = (n: number, paper: number) =>
16
+ Math.floor((n / paper > 1 ? 1 : n / paper) * 100) / 100;
16
17
 
17
18
  type UIPreProcessorProps = { template: Template; size: Size; zoomLevel: number };
18
19