@idraw/core 0.4.0-beta.10 → 0.4.0-beta.12

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.
@@ -85,10 +85,10 @@ export const MiddlewareTextEditor = (opts) => {
85
85
  elemH = element.h * scale;
86
86
  }
87
87
  textarea.style.position = 'absolute';
88
- textarea.style.left = `${elemX}px`;
89
- textarea.style.top = `${elemY}px`;
90
- textarea.style.width = `${elemW}px`;
91
- textarea.style.height = `${elemH}px`;
88
+ textarea.style.left = `${elemX - 1}px`;
89
+ textarea.style.top = `${elemY - 1}px`;
90
+ textarea.style.width = `${elemW + 2}px`;
91
+ textarea.style.height = `${elemH + 2}px`;
92
92
  textarea.style.transform = `rotate(${limitAngle(element.angle || 0)}deg)`;
93
93
  textarea.style.boxSizing = 'border-box';
94
94
  textarea.style.border = '1px solid #1973ba';
@@ -101,6 +101,9 @@ export const MiddlewareTextEditor = (opts) => {
101
101
  textarea.style.lineHeight = `${detail.lineHeight * scale}px`;
102
102
  textarea.style.fontFamily = detail.fontFamily;
103
103
  textarea.style.fontWeight = `${detail.fontWeight}`;
104
+ textarea.style.padding = '0';
105
+ textarea.style.margin = '0';
106
+ textarea.style.outline = 'none';
104
107
  textarea.value = detail.text || '';
105
108
  parent.appendChild(textarea);
106
109
  };