Skip to content

Commit

Permalink
fix getLvglObjectByName in simulator
Browse files Browse the repository at this point in the history
  • Loading branch information
mvladic committed Nov 10, 2024
1 parent c1c8405 commit 0c49f97
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions packages/project-editor/lvgl/page-runtime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,17 +166,6 @@ export abstract class LVGLPageRuntime {
);
}

getLvglObjectByName(objectName: string) {
return this.project._store.lvglIdentifiers.widgetIdentifiers.global.findIndex(
lvglIdentifier => {
return (
lvglIdentifier.identifier == objectName &&
lvglIdentifier.widgets.length == 1
);
}
);
}

getLvglGroupByName(groupName: string) {
return this.project.lvglGroups.groups.findIndex(
group => group.name == groupName
Expand Down Expand Up @@ -1197,6 +1186,10 @@ export class LVGLPageViewerRuntime extends LVGLPageRuntime {

return this.nextWidgetIndex++;
}

getLvglObjectByName(objectName: string) {
return this.runtime.assetsMap.lvglWidgetIndexes[objectName];
}
}

////////////////////////////////////////////////////////////////////////////////
Expand Down

0 comments on commit 0c49f97

Please sign in to comment.