fix: control minimum width rendering boundary error #401

pr675
Hufe921 2 years ago
parent a96d239036
commit 5272c85bbe

@ -1645,6 +1645,10 @@ export class Draw {
this._drawRichText(ctx)
this.blockParticle.render(pageNo, element, x, y)
} else {
// 如果当前元素设置左偏移,则上一元素立即绘制
if (element.left) {
this.textParticle.complete()
}
this.textParticle.record(ctx, element, x, y + offsetY)
// 如果设置字宽、字间距需单独绘制
if (element.width || element.letterSpacing) {

@ -97,8 +97,15 @@ export class Control {
}
}
}
if (!element.controlId || element.control?.minWidth) {
return true
if (!element.controlId) return true
if (element.control?.minWidth) {
if (
element.controlComponent === ControlComponent.PREFIX ||
element.controlComponent === ControlComponent.POSTFIX
) {
element.value = ''
return true
}
}
return (
element.controlComponent !== ControlComponent.PREFIX &&

Loading…
Cancel
Save