<commit_before>/* 
 * Copyright (C) 2012 B3Partners B.V.
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU 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 General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
/**
 * TransparencySlider component
 * Creates a TransparencySlider component. It uses the Slider component..
 * @author <a href="mailto:<EMAIL>"><NAME></a>
 */

Ext.define ("viewer.components.TransparencySlider",{
    extend: "viewer.components.Component",
    config:{
        sliders : [],
        sliderForUserAdded: null,
        sliderForUserAddedText: null,
        sliderForUserAddedInitTransparency: 0
        
    },
    sliderObjects : [],
    
    constructor: function (conf){        
        viewer.components.TransparencySlider.superclass.constructor.call(this, conf);
        this.initConfig(conf);        
        
        var title = "";
        if(this.config.title && !this.viewerController.layoutManager.isTabComponent(this.name)) title = this.config.title;
        this.panel = Ext.create('Ext.panel.Panel', {
            renderTo: this.getContentDiv(),
            title: title,
            height: "100%",
            html: '<div id="' + this.name + 'slidersContainer" style="width: 100%; height: 100%; padding: 10px; overflow: auto;"></div>'
        });
        conf.sliderContainer = this.name + 'slidersContainer';
        
        for(var i = 0 ; i < this.sliders.length ; i ++){
            
            var config = Ext.Object.merge(conf, this.sliders[i]);
            var slider =Ext.create("viewer.components.Slider", config);
            this.sliderObjects.push(slider);
        }
        
        if(this.sliderForUserAdded){
            var me =this;
            var c = {
                selectedLayers:[],
                initSelectedContent: this.viewerController.app.selectedContent,
                title: this.sliderForUserAddedText,
                initialTransparency: this.sliderForUserAddedInitTransparency
            }
            c = Ext.Object.merge(conf, c);
            var s =Ext.create("viewer.components.NonInitLayerSlider", c);                        
            this.sliderObjects.push(s);
        }
        return this;
    },
        <commit_msg>Set the correct value for labeling the slider.<commit_after>/* 
 * Copyright (C) 2012 B3Partners B.V.
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU 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 General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
/**
 * TransparencySlider component
 * Creates a TransparencySlider component. It uses the Slider component..
 * @author <a href="mailto:<EMAIL>"><NAME></a>
 */

Ext.define ("viewer.components.TransparencySlider",{
    extend: "viewer.components.Component",
    config:{
        sliders : [],
        sliderForUserAdded: null,
        sliderForUserAddedText: null,
        sliderForUserAddedInitTransparency: 0
        
    },
    sliderObjects : [],
    
    constructor: function (conf){        
        viewer.components.TransparencySlider.superclass.constructor.call(this, conf);
        this.initConfig(conf);        
        
        var title = "";
        if(this.config.title && !this.viewerController.layoutManager.isTabComponent(this.name)) title = this.config.title;
        this.panel = Ext.create('Ext.panel.Panel', {
            renderTo: this.getContentDiv(),
            title: title,
            height: "100%",
            html: '<div id="' + this.name + 'slidersContainer" style="width: 100%; height: 100%; padding: 10px; overflow: auto;"></div>'
        });
        conf.sliderContainer = this.name + 'slidersContainer';
        
        for(var i = 0 ; i < this.sliders.length ; i ++){
            
            var config = Ext.Object.merge(conf, this.sliders[i]);
            var slider =Ext.create("viewer.components.Slider", config);
            this.sliderObjects.push(slider);
        }
        
        if(this.sliderForUserAdded){
            var me =this;
            var c = {
                selectedLayers:[],
                initSelectedContent: this.viewerController.app.selectedContent,
                name: this.sliderForUserAddedText ? this.sliderForUserAddedText :"Overige",
                initialTransparency: this.sliderForUserAddedInitTransparency
            }
            c = Ext.Object.merge(conf, c);
            var s =Ext.create("viewer.components.NonInitLayerSlider", c);                        
            this.sliderObjects.push(s);
        }
        return this;
    },
        
{'fraction_non_alphanumeric': 0.10612393240050881, 'fraction_numerical': 0.006905324368526258, 'mean_word_length': 2.3096812988574866, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '223805', 'n_tokens_mistral': 1498, 'n_tokens_neox': 1445, 'n_words': 421}