<commit_before>(function(){
    "use strict";

    module.exports = Preview;

    function Preview(){

        var _cropResize = this;

        this.preview                    = {};
        this.preview.createImgInstance  = createImgInstance;

        function createImgInstance(croppedImageData, width, height){
            var buffer          =   document.createElement('canvas'),
                bufferCtx       =   buffer.getContext("2d"),
                src;

            buffer.width        =   width;
            buffer.height       =   height;
            bufferCtx.putImageData(croppedImageData, 0, 0);

            src = buffer.toDataURL('image/png', 1);

            _cropResize.settings.previewElement.src     = src;
            _cropResize.information.croppedImage.src    = src;
            _cropResize.information.croppedImage.width  = width;
            _cropResize.information.croppedImage.height = height;
        }<commit_msg>Updated preview element src update to be optional.<commit_after>(function(){
    "use strict";

    module.exports = Preview;

    function Preview(){

        var _cropResize = this;

        this.preview                    = {};
        this.preview.createImgInstance  = createImgInstance;

        function createImgInstance(croppedImageData, width, height){
            var buffer          =   document.createElement('canvas'),
                bufferCtx       =   buffer.getContext("2d"),
                src;

            buffer.width        =   width;
            buffer.height       =   height;
            bufferCtx.putImageData(croppedImageData, 0, 0);

            src = buffer.toDataURL('image/png', 1);

            _cropResize.information.croppedImage.src    = src;
            _cropResize.information.croppedImage.width  = width;
            _cropResize.information.croppedImage.height = height;

            if(_cropResize.settings.previewElement){
                _cropResize.settings.previewElement.src = src;
            }
        }
{'fraction_non_alphanumeric': 0.09273182957393483, 'fraction_numerical': 0.0040100250626566416, 'mean_word_length': 1.7645429362880887, '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': '3497969', 'n_tokens_mistral': 529, 'n_tokens_neox': 514, 'n_words': 90}