Sha256: 0cc2f0a72945e75113f6614df23696406e91a8f0023505a7e335259291dd78b5

Contents?: true

Size: 715 Bytes

Versions: 5

Compression:

Stored size: 715 Bytes

Contents

Ext.define('GbZh.widgets.OpacitySlider', {
	extend: 'Ext.slider.Single',
	alias: 'widget.gb-opacityslider',
    requires: [
		'GbZh.base.ViewerState'
	],
	id: 'opacityslider',
	width: 80,
	minValue: 0,
	hideLabel: true,
	useTips: true,
	tipText: function () {
		return '<b>Transparenz</b> der thematischen<br>Kartenebene einstellen';
	},
	maxValue: 100,
	listeners: {
		drag: function () {
			var opacity = (100.0 - this.getValue()) / 100.0,
				layers =  GbZh.base.ViewerState.map.getLayersByClass('OpenLayers.Layer.WMS'),
				i,
				len;
			for (i = 0, len = layers.length; i < len; i++) {
				if (!layers[i].isBaseLayer) {
					layers[i].setOpacity(opacity);
				}
			}
		}
	}

});

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
gb_mapfish_appserver-0.0.5 vendor/assets/javascripts/GbZh/widgets/OpacitySlider.js
gb_mapfish_appserver-0.0.4 vendor/assets/javascripts/GbZh/widgets/OpacitySlider.js
gb_mapfish_appserver-0.0.3 vendor/assets/javascripts/GbZh/widgets/OpacitySlider.js
gb_mapfish_appserver-0.0.2 vendor/assets/javascripts/GbZh/widgets/OpacitySlider.js
gb_mapfish_appserver-0.0.1 vendor/assets/javascripts/GbZh/widgets/OpacitySlider.js