@rcsb/rcsb-saguaro-3d
Version:
RCSB Molstar/Saguaro Web App
29 lines (28 loc) • 1.09 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.AbstractCallbackManager = void 0;
const tslib_1 = require("tslib");
const DataContainer_1 = require("../../../Utils/DataContainer");
class AbstractCallbackManager {
constructor(config) {
this.isInnerSelection = new DataContainer_1.DataContainer();
this.rcsbFvContainer = config.rcsbFvContainer;
this.stateManager = config.stateManager;
this.pfvFactory = config.pfvFactory;
}
structureViewerSelectionCallback(mode) {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
if (this.rcsbFvContainer.get() == null)
return;
this.isInnerSelection.set(true);
yield this.innerStructureViewerSelectionChange(mode);
this.isInnerSelection.set(false);
});
}
pfvSelectionChangeCallback(selection) {
if (this.isInnerSelection.get())
return;
this.innerPfvSelectionChange(selection);
}
}
exports.AbstractCallbackManager = AbstractCallbackManager;