Skip to content

Commit

Permalink
forgotten file in last commit
Browse files Browse the repository at this point in the history
  • Loading branch information
NeylMahfouf2608 committed Jan 19, 2025
1 parent 65402bd commit 5c9debd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
7 changes: 4 additions & 3 deletions Extensions/TextInput/JsExtension.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ module.exports = {

objectProperties
.getOrCreate('fillColor')
.setValue(objectContent.fillColor || '255;255;255')
.setValue(objectContent.fillColor || '0;0;0')
.setType('color')
.setLabel(_('Fill color'))
.setGroup(_('Field appearance'));
Expand Down Expand Up @@ -313,6 +313,7 @@ module.exports = {
// Properties expressions/conditions/actions:

// Deprecated, see TextContainerCapability
object.addcon
object
.addExpressionAndConditionAndAction(
'string',
Expand Down Expand Up @@ -707,7 +708,7 @@ module.exports = {
this._pixiGraphics = new PIXI.Graphics();
this._pixiTextMask = new PIXI.Graphics();
this._pixiText = new PIXI.Text(' ', {
align: 'left',
align: 'right',
fontSize: 20,
});
this._pixiText.mask = this._pixiTextMask;
Expand Down Expand Up @@ -800,7 +801,7 @@ module.exports = {
const borderWidth = object.content.borderWidth || 0;

// Draw the mask for the text.
const textOffset = borderWidth + TEXT_MASK_PADDING;
const textOffset = borderWidth + TEXT_MASK_PADDING;// + object.content.padding;
this._pixiTextMask.clear();
this._pixiTextMask.beginFill(0xdddddd, 1);
this._pixiTextMask.drawRect(
Expand Down
6 changes: 3 additions & 3 deletions Extensions/TextInput/textinputruntimeobject-pixi-renderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ namespace gdjs {
);
};


class TextInputRuntimeObjectPixiRenderer {
private _object: gdjs.TextInputRuntimeObject;
private _input: HTMLInputElement | HTMLTextAreaElement | null = null;
Expand Down Expand Up @@ -75,8 +76,6 @@ namespace gdjs {
this._form.style.boxSizing = 'border-box'; // Important for iOS, because border is added to width/height.
this._input.maxLength = this._object.getMaxLength();
this._input.style.padding = this._object.getPadding() + 'px';


this._form.style.textAlign = this._object.getTextAlign();
this._form.appendChild(this._input);
this._isSubmited = false;
Expand Down Expand Up @@ -313,6 +312,7 @@ namespace gdjs {
this._object._getRawFillColor(),
this._object.getFillOpacity()
);

}

updateBorderColorAndOpacity() {
Expand Down Expand Up @@ -372,7 +372,7 @@ namespace gdjs {
this._input.focus();
}
}

export const TextInputRuntimeObjectRenderer = TextInputRuntimeObjectPixiRenderer;
export type TextInputRuntimeObjectRenderer = TextInputRuntimeObjectPixiRenderer;

}

0 comments on commit 5c9debd

Please sign in to comment.