(project: ProjectData = {}, options: EditorLoadOptions = {})
| 949 | } |
| 950 | |
| 951 | loadData(project: ProjectData = {}, options: EditorLoadOptions = {}): ProjectData { |
| 952 | const evData = { project, options, initial: !!options.initial }; |
| 953 | let loaded = false; |
| 954 | if (!isEmptyObj(project)) { |
| 955 | this.storables.forEach((module) => module.clear()); |
| 956 | this.storables.forEach((module) => module.load(project)); |
| 957 | loaded = true; |
| 958 | } |
| 959 | this.trigger(EditorEvents.projectLoad, { ...evData, loaded }); |
| 960 | loaded && this.trigger(EditorEvents.projectLoaded, evData); |
| 961 | return project; |
| 962 | } |
| 963 | |
| 964 | /** |
| 965 | * Returns device model by name |
no test coverage detected