Skip to content

Commit 0aac48b

Browse files
committed
Fix errors
1 parent 674191d commit 0aac48b

9 files changed

Lines changed: 63 additions & 61 deletions

File tree

examples/js/hello-sdl/SDL.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/node/hello-sdl-tcp/SDL.min.js

Lines changed: 14 additions & 14 deletions
Large diffs are not rendered by default.

examples/node/hello-sdl/SDL.min.js

Lines changed: 14 additions & 14 deletions
Large diffs are not rendered by default.

examples/webengine/hello-sdl/SDL.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/js/dist/SDL.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/js/src/manager/SystemCapabilityManager.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ class SystemCapabilityManager extends _SubManagerBase {
238238
// return if display capabilities don't exist.
239239
if (displayCapabilities === null || displayCapabilities === undefined) {
240240
defaultWindowCapability.setTextFields(_ManagerUtility.getAllTextFields());
241-
defaultWindowCapability.setImageFields(_ManagerUtility.getAllTextFields());
241+
defaultWindowCapability.setImageFields(_ManagerUtility.getAllImageFields());
242242
displayCapability.setWindowCapabilities([defaultWindowCapability]);
243243
return [displayCapability];
244244
}

lib/js/src/manager/_ManagerUtility.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ class _ManagerUtility {
5151
}
5252
if (windowCapability.getImageFields() !== null) {
5353
for (const field of windowCapability.getImageFields()) {
54-
if (field !== null && name === field.getName()) {
54+
if (field !== null && name === field.getNameParam()) {
5555
return true;
5656
}
5757
}
@@ -72,7 +72,7 @@ class _ManagerUtility {
7272
}
7373
if (windowCapability.getTextFields() !== null) {
7474
for (const field of windowCapability.getTextFields()) {
75-
if (field !== null && name === field.getName()) {
75+
if (field !== null && name === field.getNameParam()) {
7676
return true;
7777
}
7878
}
@@ -92,16 +92,16 @@ class _ManagerUtility {
9292
for (const field of windowCapability.getTextFields()) {
9393
let fieldNumber = 0;
9494
switch (field.getNameParam()) {
95-
case mainField1:
95+
case TextFieldName.mainField1:
9696
fieldNumber = 1;
9797
break;
98-
case mainField2:
98+
case TextFieldName.mainField2:
9999
fieldNumber = 2;
100100
break;
101-
case mainField3:
101+
case TextFieldName.mainField3:
102102
fieldNumber = 3;
103103
break;
104-
case mainField4:
104+
case TextFieldName.mainField4:
105105
fieldNumber = 4;
106106
break;
107107
}

lib/js/src/manager/screen/_TextAndGraphicManagerBase.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -647,10 +647,11 @@ class _TextAndGraphicManagerBase extends _SubManagerBase {
647647
_shouldUpdatePrimaryImage () {
648648
const templateSupportsPrimaryArtwork = this._templateSupportsImageField(ImageFieldName.graphic);
649649

650-
const currentScreenDataPrimaryGraphicName = (currentScreenData !== null && currentScreenData.getGraphic() !== null) ? currentScreenData.getGraphic().getValue() : null;
650+
const currentScreenDataPrimaryGraphicName = (this._currentScreenData !== null && this._currentScreenData.getGraphic() !== null) ? this._currentScreenData.getGraphic().getValueParam() : null;
651651
const primaryGraphicName = this._primaryGraphic !== null ? this._primaryGraphic.getName() : null;
652+
652653
return templateSupportsPrimaryArtwork
653-
&& (`${currentScreenDataPrimaryGraphicName}`).toLowerCase() === (`${primaryGraphicName}`).toLowerCase()
654+
&& (`${currentScreenDataPrimaryGraphicName}`).toLowerCase() !== (`${primaryGraphicName}`).toLowerCase()
654655
&& this._primaryGraphic !== null;
655656
}
656657

@@ -662,10 +663,11 @@ class _TextAndGraphicManagerBase extends _SubManagerBase {
662663
_shouldUpdateSecondaryImage () {
663664
const templateSupportsSecondaryArtwork = this._templateSupportsImageField(ImageFieldName.graphic) || this._templateSupportsImageField(ImageFieldName.secondaryGraphic);
664665

665-
const currentScreenDataSecondaryGraphicName = (currentScreenData !== null && currentScreenData.getSecondaryGraphic() !== null) ? currentScreenData.getSecondaryGraphic().getValue() : null;
666+
const currentScreenDataSecondaryGraphicName = (this._currentScreenData !== null && this._currentScreenData.getSecondaryGraphic() !== null) ? this._currentScreenData.getSecondaryGraphic().getValueParam() : null;
666667
const secondaryGraphicName = this._secondaryGraphic !== null ? this._secondaryGraphic.getName() : null;
668+
667669
return templateSupportsSecondaryArtwork
668-
&& (`${currentScreenDataSecondaryGraphicName}`).toLowerCase() === (`${secondaryGraphicName}`).toLowerCase()
670+
&& (`${currentScreenDataSecondaryGraphicName}`).toLowerCase() !== (`${secondaryGraphicName}`).toLowerCase()
669671
&& this._secondaryGraphic !== null;
670672
}
671673

@@ -694,7 +696,7 @@ class _TextAndGraphicManagerBase extends _SubManagerBase {
694696
* @return {Boolean} - True if text field is supported, false if not
695697
*/
696698
_templateSupportsTextField (name) {
697-
return this._defaultMainWindowCapability === null || ManagerUtility.hasTextFieldOfName(this._defaultMainWindowCapability, name);
699+
return this._defaultMainWindowCapability === null || _ManagerUtility.hasTextFieldOfName(this._defaultMainWindowCapability, name);
698700
}
699701

700702
/**
@@ -704,7 +706,7 @@ class _TextAndGraphicManagerBase extends _SubManagerBase {
704706
* @return {Boolean} - True if image field is supported, false if not
705707
*/
706708
_templateSupportsImageField (name) {
707-
return this._defaultMainWindowCapability === null || ManagerUtility.hasImageFieldOfName(this._defaultMainWindowCapability, name);
709+
return this._defaultMainWindowCapability === null || _ManagerUtility.hasImageFieldOfName(this._defaultMainWindowCapability, name);
708710
}
709711

710712
// SCREEN ITEM SETTERS AND GETTERS

lib/node/dist/SDL.min.js

Lines changed: 14 additions & 14 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)