{"size": 943, "ext": "js", "max_stars_repo_path": "packages/ove-app-whiteboard/src/client/common/whiteboard.js", "max_stars_repo_name": "adityadhawan22/ove-apps", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "packages/ove-app-whiteboard/src/client/common/whiteboard.js", "max_issues_repo_name": "adityadhawan22/ove-apps", "max_issues_repo_issues_event_min_datetime": "2018-10-03T00:46:37.000Z", "max_issues_repo_issues_event_max_datetime": "2021-10-19T01:41:33.000Z", "max_forks_repo_path": "packages/ove-app-whiteboard/src/client/common/whiteboard.js", "max_forks_repo_name": "adityadhawan22/ove-apps", "max_forks_repo_forks_event_min_datetime": "2022-02-17T11:01:47.000Z", "max_forks_repo_forks_event_max_datetime": "2022-02-17T11:01:47.000Z"}
{"max_stars_count": null, "max_issues_count": 155, "max_forks_count": 1, "avg_line_length": 33.6785714286, "max_line_length": 87, "alphanum_fraction": 0.6405090138}
const log = OVE.Utils.Logger(Constants.APP_NAME, Constants.LOG_LEVEL);

$(function () {
    // This is what happens first. After OVE is loaded, either the viewer or controller
    // will be initialized.
    $(document).ready(function () {
        log.debug('Starting application');
        window.ove = new OVE(Constants.APP_NAME);
        log.debug('Completed loading OVE');
        window.ove.context.isInitialized = false;
        beginInitialization();
    });
});

updateCanvas = function () {
    const context = window.ove.context;
    if (!context.isInitialized) {
        log.debug('Creating whiteboard canvas');
        $('<canvas>', {
            class: Constants.WHITEBOARD_CANVAS.substring(1)
        }).appendTo(Constants.CONTENT_DIV);
        log.debug('Initializing plotter');
        initializePlotter();
        context.isInitialized = true;
        log.debug('Application is initialized:', context.isInitialized);
    }
};
