<commit_before>/* Copyright (c) 2012-2014 The TagSpaces Authors. All rights reserved.
 * Use of this source code is governed by a AGPL3 license that 
 * can be found in the LICENSE file. */
/* global define, isCordova */

define(function(require, exports, module) {
"use strict";

console.log("Loading UI for Image Viewer");

    var TSCORE = require("tscore");

    var extensionID;
    var $containerElem;
    var internPath;
    var filePath;

    function ExtUI(extID, extContainerID, filePth, uiTemplate) {
        extensionID = extID;
        $containerElem = $('#'+extContainerID);
        internPath = filePth;

        if(isCordova || isWeb) {
            filePath = filePth;
        } else {
            filePath = "file:///"+filePth;
        }

        //$("#"+extensionID+"Image").unbind();
        //$("#"+extensionID+"Image").remove();

        $containerElem.children().remove();

        var context = {
            id: extensionID,
            imgPath: filePath
        };
        //console.log(uiTemplate(context));
        $containerElem.append(uiTemplate(context));

        if(isCordova) {
            $("#"+extensionID+"ZoomOut").hide();
            $("#"+extensionID+"ZoomIn").hide();
        }

        $("#"+extensionID+"imgViewer")
            .panzoom({
                $zoomIn: $("#"+extensionID+"ZoomIn"),
                $zoomOut: $("#"+extensionID+"ZoomOut"),
                $reset: $("#"+extensionID+"ZoomReset"),
                //contain: true,<commit_msg>adding a white background for the image viewer, usefull for viewing transparent images<commit_after>/* Copyright (c) 2012-2014 The TagSpaces Authors. All rights reserved.
 * Use of this source code is governed by a AGPL3 license that 
 * can be found in the LICENSE file. */
/* global define, isCordova */

define(function(require, exports, module) {
"use strict";

console.log("Loading UI for Image Viewer");

    var TSCORE = require("tscore");

    var extensionID;
    var $containerElem;
    var internPath;
    var filePath;

    function ExtUI(extID, extContainerID, filePth, uiTemplate) {
        extensionID = extID;
        $containerElem = $('#'+extContainerID);
        internPath = filePth;

        if(isCordova || isWeb) {
            filePath = filePth;
        } else {
            filePath = "file:///"+filePth;
        }

        //$("#"+extensionID+"Image").unbind();
        //$("#"+extensionID+"Image").remove();

        $containerElem.children().remove();

        var context = {
            id: extensionID,
            imgPath: filePath
        };
        //console.log(uiTemplate(context));

        $containerElem.attr("style","width: 100%; height: 100%; background-color: white;");

        $containerElem.append(uiTemplate(context));

        if(isCordova) {
            $("#"+extensionID+"ZoomOut").hide();
            $("#"+extensionID+"ZoomIn").hide();
        }

        $("#"+extensionID+"imgViewer")
            .panzoom({
                $zoomIn: $("#"+extensionID+"ZoomIn"),
                $zoomOut: $("#"+extensionID+"ZoomOut"),
                $reset: $("#"+extensionID+"ZoomReset"),
                //contain: true,
{'fraction_non_alphanumeric': 0.15560495395363608, 'fraction_numerical': 0.007621467132422992, 'mean_word_length': 2.312302839116719, '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': '4417987', 'n_tokens_mistral': 913, 'n_tokens_neox': 872, 'n_words': 207}