Skip to content

Commit

Permalink
update JsExtensions
Browse files Browse the repository at this point in the history
  • Loading branch information
NeylMahfouf2608 committed Jan 20, 2025
1 parent 4293040 commit c62f4fd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Extensions/TextInput/JsExtension.js
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ module.exports = {

objectProperties
.getOrCreate('maxLength')
.setValue(objectContent.maxLength || 40)
.setValue(objectContent.maxLength || 0)
.setType('number')
.setLabel(_('Max length'))
.setAdvanced(true);
Expand Down Expand Up @@ -701,7 +701,7 @@ module.exports = {
this._pixiGraphics = new PIXI.Graphics();
this._pixiTextMask = new PIXI.Graphics();
this._pixiText = new PIXI.Text(' ', {
align: 'right',
align: 'left',
fontSize: 20,
});
this._pixiText.mask = this._pixiTextMask;
Expand Down
5 changes: 2 additions & 3 deletions Extensions/TextInput/textinputruntimeobject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,11 +210,10 @@ namespace gdjs {
this.setReadOnly(newObjectData.content.readOnly);
}
if (oldObjectData.content.maxLength !== newObjectData.content.maxLength) {
this.SetMaxLength(newObjectData.content.maxLength);
this.setMaxLength(newObjectData.content.maxLength);
}
if (oldObjectData.content.textAlign !== newObjectData.content.textAlign) {
this._textAlign = newObjectData.content.textAlign;
//this.setTextAlignement(newObjectData.content.textAlign);
}
if (oldObjectData.content.padding !== newObjectData.content.padding) {
this.SetPadding(newObjectData.content.padding);
Expand Down Expand Up @@ -543,7 +542,7 @@ namespace gdjs {
getMaxLength(): integer {
return this._maxLength;
}
SetMaxLength(value: integer) {
setMaxLength(value: integer) {
this._maxLength = value;
this._renderer.updateMaxLength();
}
Expand Down

0 comments on commit c62f4fd

Please sign in to comment.