[Lada-commits] [PATCH 1 of 3] make map panel collapsable in Stammdaten form
Wald Commits
scm-commit at wald.intevation.org
Wed Apr 5 16:04:45 CEST 2017
# HG changeset patch
# User Michael Stanko <mstanko at bfs.de>
# Date 1491400965 -7200
# Node ID 48c9c7b0ceef2d1ce20a84adc56a946b1f5a297d
# Parent 01f083db45b7e5edf88e9c3c87dc2fe0c638a0ca
make map panel collapsable in Stammdaten form
diff -r 01f083db45b7 -r 48c9c7b0ceef app/view/panel/Ort.js
--- a/app/view/panel/Ort.js Wed Mar 29 14:27:20 2017 +0200
+++ b/app/view/panel/Ort.js Wed Apr 05 16:02:45 2017 +0200
@@ -19,7 +19,7 @@
initComponent: function() {
var i18n = Lada.getApplication().bundle;
-
+
// Different Layout of toolbar depending on the bars position.
if (this.toolbarPos == 'top') {
this.dockedItems = [{
@@ -71,11 +71,12 @@
xtype: 'ortstammdatengrid',
width: '60%',
editableGrid: this.editableGrid,
- collapsible: true,
- region: 'east'
+ region: 'center'
}, {
xtype: 'map',
- region: 'center',
+ flex: 1,
+ collapsible: true,
+ region: 'east',
layout: 'border',
title: i18n.getMsg('map.title'),
externalOrteStore: true,
@@ -83,9 +84,15 @@
beforecollapse: function() {
var c = this.map.getControlsByClass('OpenLayers.Control.ScaleLine');
this.map.removeControl(c[0]);
+ for (i = 0; i < this.map.layers.length; i++) {
+ this.map.layers[i].setVisibility(false);
+ }
},
expand: function() {
this.map.addControl(new OpenLayers.Control.ScaleLine());
+ for (i = 0; i < this.map.layers.length; i++) {
+ this.map.layers[i].setVisibility(true);
+ }
}
}
}];
More information about the Lada-commits
mailing list