<commit_before>initDraw(document.getElementById('Screen'));

function initDraw(canvas) {
    var widthMulti;
    var heightMulti;

    function getPos() {
        var screenElement = document.getElementById("ScreenCapture");
        var bound = (screenElement.getBoundingClientRect());
        // We should get real number instead of 1080x1920 as default.
        widthMulti = 1080/bound.width;
        heightMulti = 1920/bound.height;
        return {x:bound.x, y: bound.y};
    }

    var pos = getPos();
    function setMousePosition(e) {
        var ev = e || window.event; //Moz || IE
        if (ev.pageX) { //Moz
            mouse.x = ev.pageX - pos.x;
            mouse.y = ev.pageY - pos.y;
        } else if (ev.clientX) { //IE
            mouse.x = ev.clientX + document.body.scrollLeft;
            mouse.y = ev.clientY + document.body.scrollTop;
        }<commit_msg>Fixed crop photo size bug.<commit_after>initDraw(document.getElementById('Screen'));

function initDraw(canvas) {
    var widthMulti;
    var heightMulti;

    function getPos() {
        var screenElement = document.getElementById("ScreenCapture");
        var bound = (screenElement.getBoundingClientRect());
        // We should get real number instead of 1080x1920 as default.
        widthMulti = 1080/bound.width;
        heightMulti = 1920/bound.height;
        return {x:bound.x, y: bound.y};
    }

    var pos = getPos();
    function setMousePosition(e) {
        pos = getPos();
        var ev = e || window.event; //Moz || IE
        if (ev.pageX) { //Moz
            mouse.x = ev.pageX - pos.x;
            mouse.y = ev.pageY - pos.y;
        } else if (ev.clientX) { //IE
            mouse.x = ev.clientX + document.body.scrollLeft;
            mouse.y = ev.clientY + document.body.scrollTop;
        }
{'fraction_non_alphanumeric': 0.12409571508069003, 'fraction_numerical': 0.017807456872565387, 'mean_word_length': 2.1269565217391304, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7578361', 'n_tokens_mistral': 566, 'n_tokens_neox': 530, 'n_words': 132}