fix(core): Address 3D reconstruction and Android compatibility issues and clean up 4D data mode (#4762)
This commit is contained in:
1 parent
4d06a7d286
commit
149d6d049c
32 files changed
+529
-529
No files matched your search
@@ -285,14 +285,25 @@ export default class HangingProtocolService extends PubSubService {
|
||||
* @param protocolId - the id of the protocol
|
||||
* @returns protocol - the protocol with the given id
|
||||
*/
|
||||
public getProtocolById(protocolId: string): HangingProtocol.Protocol {
|
||||
public getProtocolById(protocolId: string, caseInsensitive = true): HangingProtocol.Protocol {
|
||||
if (!protocolId) {
|
||||
return;
|
||||
}
|
||||
if (protocolId === this.protocol?.id) {
|
||||
return this.protocol;
|
||||
}
|
||||
const protocol = this.protocols.get(protocolId);
|
||||
|
||||
let protocol = this.protocols.get(protocolId);
|
||||
if (!protocol && caseInsensitive) {
|
||||
const lowerCaseId = protocolId.toLowerCase();
|
||||
for (const [key] of this.protocols) {
|
||||
if (key.toLowerCase() === lowerCaseId) {
|
||||
protocol = this.getProtocolById(key);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!protocol) {
|
||||
throw new Error(`No protocol ${protocolId} found`);
|
||||
}
|
||||
@@ -533,8 +544,7 @@ export default class HangingProtocolService extends PubSubService {
|
||||
}
|
||||
|
||||
_validateProtocol(protocol: HangingProtocol.Protocol): HangingProtocol.Protocol {
|
||||
protocol.id = protocol.id || protocol.name;
|
||||
protocol.name = protocol.name || protocol.id;
|
||||
protocol.name = protocol.name ?? protocol.id;
|
||||
const { stages } = protocol;
|
||||
|
||||
if (!stages) {
|
||||
|
||||
Reference in new issue
Block a user