fix: control minimum width rendering boundary error #401
This commit is contained in:
@@ -1645,6 +1645,10 @@ export class Draw {
|
|||||||
this._drawRichText(ctx)
|
this._drawRichText(ctx)
|
||||||
this.blockParticle.render(pageNo, element, x, y)
|
this.blockParticle.render(pageNo, element, x, y)
|
||||||
} else {
|
} else {
|
||||||
|
// 如果当前元素设置左偏移,则上一元素立即绘制
|
||||||
|
if (element.left) {
|
||||||
|
this.textParticle.complete()
|
||||||
|
}
|
||||||
this.textParticle.record(ctx, element, x, y + offsetY)
|
this.textParticle.record(ctx, element, x, y + offsetY)
|
||||||
// 如果设置字宽、字间距需单独绘制
|
// 如果设置字宽、字间距需单独绘制
|
||||||
if (element.width || element.letterSpacing) {
|
if (element.width || element.letterSpacing) {
|
||||||
|
|||||||
@@ -97,9 +97,16 @@ export class Control {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!element.controlId || element.control?.minWidth) {
|
if (!element.controlId) return true
|
||||||
|
if (element.control?.minWidth) {
|
||||||
|
if (
|
||||||
|
element.controlComponent === ControlComponent.PREFIX ||
|
||||||
|
element.controlComponent === ControlComponent.POSTFIX
|
||||||
|
) {
|
||||||
|
element.value = ''
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return (
|
return (
|
||||||
element.controlComponent !== ControlComponent.PREFIX &&
|
element.controlComponent !== ControlComponent.PREFIX &&
|
||||||
element.controlComponent !== ControlComponent.POSTFIX &&
|
element.controlComponent !== ControlComponent.POSTFIX &&
|
||||||
|
|||||||
Reference in New Issue
Block a user