2020-05-25 21:30:55 -05:00
|
|
|
import { BindingHandlersRegisterer } from "./Bindings/BindingHandlersRegisterer";
|
2020-07-24 16:45:48 -05:00
|
|
|
import { sendMessage } from "./Common/MessageHandler";
|
2020-05-25 21:30:55 -05:00
|
|
|
import * as ko from "knockout";
|
2020-07-20 12:59:40 -05:00
|
|
|
import Explorer from "./Explorer/Explorer";
|
2020-05-25 21:30:55 -05:00
|
|
|
|
|
|
|
export const applyExplorerBindings = (explorer: Explorer) => {
|
|
|
|
if (!!explorer) {
|
|
|
|
ko.applyBindings(explorer);
|
|
|
|
// This message should ideally be sent immediately after explorer has been initialized for optimal data explorer load times.
|
|
|
|
// TODO: Send another message to describe that the bindings have been applied, and handle message transfers accordingly in the portal
|
2020-07-24 16:45:48 -05:00
|
|
|
sendMessage("ready");
|
2020-05-25 21:30:55 -05:00
|
|
|
window.dataExplorer = explorer;
|
|
|
|
BindingHandlersRegisterer.registerBindingHandlers();
|
|
|
|
$("#divExplorer").show();
|
|
|
|
}
|
|
|
|
};
|