<commit_before>/* 
 * Copyright (C) 2018 B3Partners B.V.
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

/* global Ext, actionBeans, FlamingoAppLoader */

Ext.define("viewer.components.DownloadWKT", {
    extend: "viewer.components.Component",
    vectorLayer: null,
    config: {
        types: null
    },
    /**
     * @constructor
     * creating a DownloadWKT module.
     */
    constructor: function (conf) {
        this.initConfig(conf);
        viewer.components.DownloadWKT.superclass.constructor.call(this, this.config);
        var me = this;
        this.renderButton({
            handler: function () {
                var deferred = me.createDeferred();
                me.showWindow();
                return deferred.promise;
            },
            text: me.config.title,
            icon: me.config.iconUrl,
            tooltip: me.config.tooltip,
            label: me.config.label
        });
        this.iconPath=FlamingoAppLoader.get('contextPath')+"/viewer-html/components/resources/images/drawing/";
    },
    showWindow: function () {
        if (!this.maincontainer) {
            this.createComponents();
        }
        this.popup.show();
    },
    createComponents: function () {

        if (this.vectorLayer === null) {
            this.createVectorLayer();
        }<commit_msg>Fix spinner for downloadwkt button<commit_after>/* 
 * Copyright (C) 2018 B3Partners B.V.
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

/* global Ext, actionBeans, FlamingoAppLoader */

Ext.define("viewer.components.DownloadWKT", {
    extend: "viewer.components.Component",
    vectorLayer: null,
    config: {
        types: null
    },
    /**
     * @constructor
     * creating a DownloadWKT module.
     */
    constructor: function (conf) {
        this.initConfig(conf);
        viewer.components.DownloadWKT.superclass.constructor.call(this, this.config);
        var me = this;
        this.renderButton({
            handler: function () {
                me.showWindow();
            },
            text: me.config.title,
            icon: me.config.iconUrl,
            tooltip: me.config.tooltip,
            label: me.config.label
        });
        this.iconPath=FlamingoAppLoader.get('contextPath')+"/viewer-html/components/resources/images/drawing/";
    },
    showWindow: function () {
        if (!this.maincontainer) {
            this.createComponents();
        }
        this.popup.show();
    },
    createComponents: function () {

        if (this.vectorLayer === null) {
            this.createVectorLayer();
        }
{'fraction_non_alphanumeric': 0.1021955044432828, 'fraction_numerical': 0.0031364349189754314, 'mean_word_length': 2.3957409050576755, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 7, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4891186', 'n_tokens_mistral': 1041, 'n_tokens_neox': 1009, 'n_words': 327}