[Commits] r2794 - sandbox/gxm/geoext/gxm/examples
commits at geoext.org
commits at geoext.org
Mon Aug 8 15:41:42 CEST 2011
Author: marcjansen
Date: 2011-08-08 15:41:41 +0200 (Mon, 08 Aug 2011)
New Revision: 2794
Modified:
sandbox/gxm/geoext/gxm/examples/buttons.js
sandbox/gxm/geoext/gxm/examples/examples.css
Log:
[gxm]
- refactor examples to drop the support for SegmentedButton
- move the minus image from library css to example css
Modified: sandbox/gxm/geoext/gxm/examples/buttons.js
===================================================================
--- sandbox/gxm/geoext/gxm/examples/buttons.js 2011-07-29 08:26:53 UTC (rev 2793)
+++ sandbox/gxm/geoext/gxm/examples/buttons.js 2011-08-08 13:41:41 UTC (rev 2794)
@@ -26,7 +26,10 @@
map.addLayers([ol_wms]);
var btnClickCallback = function(btn){
- Ext.Msg.alert('Callback defined in application', 'You tapped the "' + btn.title + '"-button.');
+ Ext.Msg.alert(
+ 'Callback defined in application',
+ 'You tapped the "' + btn.title + '"-button.'
+ );
};
var zoomin = new OpenLayers.Control.ZoomIn();
@@ -53,19 +56,22 @@
var nav = new OpenLayers.Control.TouchNavigation();
var btnNavigation = {
- xtype: 'gxm_segmentedbutton',
+ xtype: 'gxm_button',
exclusiveGroup: 'working-on-map',
map: map,
- items: [{
- text: 'Navigation',
- control: nav,
- pressed: true,
- handler: function(btn, evt, activeState){
- Ext.Msg.alert('Navigation', 'Navigation is ' + (activeState ? 'active' : 'inactive') + '.');
- }
- }]
+ text: 'Navigation',
+ control: nav,
+ pressed: true,
+ handler: function(btn, evt, activeState){
+ Ext.Msg.alert(
+ 'Navigation',
+ 'Navigation is ' +
+ (activeState ? 'active' : 'inactive')
+ + '.'
+ );
+ }
};
-
+
// create a vector layer for drawing
var vector = new OpenLayers.Layer.Vector('Vector Layer', {
styleMap: new OpenLayers.StyleMap({
@@ -107,9 +113,12 @@
};
var digGroup = {
- xtype: 'gxm_segmentedbutton',
- map: map,
- exclusiveGroup: 'working-on-map',
+ xtype: 'segmentedbutton',
+ defaults: {
+ xtype: "gxm_button",
+ exclusiveGroup: 'working-on-map',
+ map: map
+ },
items: [
btnDigPoint,
btnDigLine,
Modified: sandbox/gxm/geoext/gxm/examples/examples.css
===================================================================
--- sandbox/gxm/geoext/gxm/examples/examples.css 2011-07-29 08:26:53 UTC (rev 2793)
+++ sandbox/gxm/geoext/gxm/examples/examples.css 2011-08-08 13:41:41 UTC (rev 2794)
@@ -2,6 +2,10 @@
font-weight: bold !important;
}
+img.minus {
+ -webkit-mask-image: url(../img/minus1.png);
+}
+
span.string {
color: darkgreen;
}
More information about the Commits
mailing list