[fusion-commits] r1367 - sandbox/olcore/widgets
svn_fusion at osgeo.org
svn_fusion at osgeo.org
Tue Apr 8 16:01:19 EDT 2008
Author: pdeschamps
Date: 2008-04-08 16:01:18 -0400 (Tue, 08 Apr 2008)
New Revision: 1367
Modified:
sandbox/olcore/widgets/LinkToView.js
sandbox/olcore/widgets/MapMenu.js
sandbox/olcore/widgets/Maptip.js
sandbox/olcore/widgets/Measure.js
sandbox/olcore/widgets/Navigator.js
sandbox/olcore/widgets/OverviewMap.js
sandbox/olcore/widgets/Pan.js
sandbox/olcore/widgets/PanOnClick.js
sandbox/olcore/widgets/PanQuery.js
sandbox/olcore/widgets/Print.js
sandbox/olcore/widgets/RefreshMap.js
sandbox/olcore/widgets/SaveMap.js
sandbox/olcore/widgets/Scalebar.js
sandbox/olcore/widgets/Search.js
sandbox/olcore/widgets/Select.js
sandbox/olcore/widgets/SelectPolygon.js
sandbox/olcore/widgets/SelectRadius.js
sandbox/olcore/widgets/SelectRadiusValue.js
sandbox/olcore/widgets/SelectWithin.js
sandbox/olcore/widgets/SelectionInfo.js
sandbox/olcore/widgets/SelectionPanel.js
sandbox/olcore/widgets/TaskPane.js
sandbox/olcore/widgets/ViewOptions.js
sandbox/olcore/widgets/ViewSize.js
sandbox/olcore/widgets/Zoom.js
sandbox/olcore/widgets/ZoomOnClick.js
sandbox/olcore/widgets/ZoomToSelection.js
Log:
switched to OL Prototype.
Modified: sandbox/olcore/widgets/LinkToView.js
===================================================================
--- sandbox/olcore/widgets/LinkToView.js 2008-04-08 18:05:14 UTC (rev 1366)
+++ sandbox/olcore/widgets/LinkToView.js 2008-04-08 20:01:18 UTC (rev 1367)
@@ -36,6 +36,7 @@
//console.log('LinkToView.initialize');
//Object.inheritFrom(this, Fusion.Widget.prototype, [widgetTag, false]);
Fusion.Widget.prototype.initialize.apply(this, [widgetTag, false]);
+
var json = widgetTag.extension;
this.baseUrl = window.location.protocol + '//' + window.location.host + window.location.pathname + '?';
Modified: sandbox/olcore/widgets/MapMenu.js
===================================================================
--- sandbox/olcore/widgets/MapMenu.js 2008-04-08 18:05:14 UTC (rev 1366)
+++ sandbox/olcore/widgets/MapMenu.js 2008-04-08 20:01:18 UTC (rev 1367)
@@ -46,7 +46,7 @@
//Object.inheritFrom(this, Fusion.Tool.MenuBase.prototype, []);
Fusion.Widget.prototype.initialize.apply(this, [widgetTag, false]);
Fusion.Tool.MenuBase.prototype.initialize.apply(this, []);
-
+
this.enable();
var json = widgetTag.extension;
Modified: sandbox/olcore/widgets/Maptip.js
===================================================================
--- sandbox/olcore/widgets/Maptip.js 2008-04-08 18:05:14 UTC (rev 1366)
+++ sandbox/olcore/widgets/Maptip.js 2008-04-08 20:01:18 UTC (rev 1367)
@@ -47,8 +47,9 @@
*
* **********************************************************************/
-Fusion.Widget.Maptip = Class.create();
-Fusion.Widget.Maptip.prototype =
+//Fusion.Widget.Maptip = Class.create();
+//Fusion.Widget.Maptip.prototype =
+Fusion.Widget.Maptip = OpenLayers.Class(Fusion.Widget,
{
oCurrentPosition: null,
oMapTipPosition: null,
@@ -61,7 +62,8 @@
initialize : function(widgetTag)
{
//console.log('Maptip.initialize');
- Object.inheritFrom(this, Fusion.Widget.prototype, [widgetTag, true]);
+ //Object.inheritFrom(this, Fusion.Widget.prototype, [widgetTag, true]);
+ Fusion.Widget.prototype.initialize.apply(this, [widgetTag, true]);
var json = widgetTag.extension;
this.sTarget = json.Target ? json.Target[0] : "MaptipWindow";
@@ -259,4 +261,4 @@
OpenLayers.Event.stop(evt, true);
return false;
}
-};
+});
Modified: sandbox/olcore/widgets/Measure.js
===================================================================
--- sandbox/olcore/widgets/Measure.js 2008-04-08 18:05:14 UTC (rev 1366)
+++ sandbox/olcore/widgets/Measure.js 2008-04-08 20:01:18 UTC (rev 1367)
@@ -39,8 +39,10 @@
Fusion.Event.MEASURE_CLEAR = Fusion.Event.lastEventId++;
Fusion.Event.MEASURE_COMPLETE = Fusion.Event.lastEventId++;
-Fusion.Widget.Measure = Class.create();
-Fusion.Widget.Measure.prototype = {
+//Fusion.Widget.Measure = Class.create();
+//Fusion.Widget.Measure.prototype = {
+Fusion.Widget.Measure = OpenLayers.Class(Fusion.Widget, Fusion.Tool.ButtonBase, Fusion.Tool.Canvas,
+{
isDigitizing: false,
//distance of each segment
distances: null,
@@ -78,9 +80,13 @@
areaStyle: null,
initialize : function(widgetTag) {
- Object.inheritFrom(this, Fusion.Widget.prototype, [widgetTag, true]);
- Object.inheritFrom(this, Fusion.Tool.ButtonBase.prototype, []);
- Object.inheritFrom(this, Fusion.Tool.Canvas.prototype, []);
+ //Object.inheritFrom(this, Fusion.Widget.prototype, [widgetTag, true]);
+ //Object.inheritFrom(this, Fusion.Tool.ButtonBase.prototype, []);
+ //Object.inheritFrom(this, Fusion.Tool.Canvas.prototype, []);
+ Fusion.Widget.prototype.initialize.apply(this, [widgetTag, true]);
+ Fusion.Tool.ButtonBase.prototype.initialize.apply(this, []);
+ Fusion.Tool.Canvas.prototype.initialize.apply(this, []);
+
this.asCursor = ['crosshair'];
var json = widgetTag.extension;
this.units = (json.Units && (json.Units[0] != '')) ? Fusion.unitFromName(json.Units[0]): this.units;
@@ -515,14 +521,16 @@
}
}
}
-};
+});
/*
* A class for handling the 'tooltip' for the distance measurement. Markers also hold the distance
values and all markers are held in an array in the Measure widget for access.
*/
-Fusion.Widget.Measure.DistanceMarker = Class.create();
-Fusion.Widget.Measure.DistanceMarker.prototype = {
+//Fusion.Widget.Measure.DistanceMarker = Class.create();
+//Fusion.Widget.Measure.DistanceMarker.prototype = {
+Fusion.Widget.PanQuery = OpenLayers.Class(
+{
calculatingImg: null,
distance: 0,
initialize: function(units, precision, label) {
@@ -591,4 +599,4 @@
}
return size;
}
-};
+});
Modified: sandbox/olcore/widgets/Navigator.js
===================================================================
--- sandbox/olcore/widgets/Navigator.js 2008-04-08 18:05:14 UTC (rev 1366)
+++ sandbox/olcore/widgets/Navigator.js 2008-04-08 20:01:18 UTC (rev 1367)
@@ -29,14 +29,16 @@
* A widget that immplements an in-map navigation control with zoom and pan.
* **********************************************************************/
-Fusion.Widget.Navigator = Class.create();
-Fusion.Widget.Navigator.prototype = {
+//Fusion.Widget.Navigator = Class.create();
+//Fusion.Widget.Navigator.prototype = {
+Fusion.Widget.Navigator = OpenLayers.Class(Fusion.Widget,
+{
bInternalChange: false,
zoomFactor: 2,
panAmount: 50,
initialize : function(widgetTag) {
- Object.inheritFrom(this, Fusion.Widget.prototype, [widgetTag, true]);
-
+ //Object.inheritFrom(this, Fusion.Widget.prototype, [widgetTag, true]);
+ Fusion.Widget.prototype.initialize.apply(this, [widgetTag, true]);
var m = document.createElement('map');
m.name = 'Navigator_ImageMap';
m.id = 'Navigator_ImageMap';
@@ -290,4 +292,4 @@
}
-};
+});
Modified: sandbox/olcore/widgets/OverviewMap.js
===================================================================
--- sandbox/olcore/widgets/OverviewMap.js 2008-04-08 18:05:14 UTC (rev 1366)
+++ sandbox/olcore/widgets/OverviewMap.js 2008-04-08 20:01:18 UTC (rev 1367)
@@ -30,8 +30,10 @@
* primary map.
* **********************************************************************/
-Fusion.Widget.OverviewMap = Class.create();
-Fusion.Widget.OverviewMap.prototype = {
+//Fusion.Widget.OverviewMap = Class.create();
+//Fusion.Widget.OverviewMap.prototype = {
+Fusion.Widget.OverviewMap = OpenLayers.Class(Fusion.Widget,
+{
oSize: null,
nMinRatio : 4,
nMaxRatio : 32,
@@ -39,7 +41,8 @@
initialize : function(widgetTag) {
//console.log('OverviewMap.initialize');
- Object.inheritFrom(this, Fusion.Widget.prototype, [widgetTag, false]);
+ //Object.inheritFrom(this, Fusion.Widget.prototype, [widgetTag, false]);
+ Fusion.Widget.prototype.initialize.apply(this, [widgetTag, false]);
var json = widgetTag.extension;
if (json.MinRatio) {
@@ -146,5 +149,5 @@
}
}
-};
+});
Modified: sandbox/olcore/widgets/Pan.js
===================================================================
--- sandbox/olcore/widgets/Pan.js 2008-04-08 18:05:14 UTC (rev 1366)
+++ sandbox/olcore/widgets/Pan.js 2008-04-08 20:01:18 UTC (rev 1367)
@@ -29,12 +29,17 @@
* A widget that allows for naviagtion by panning
* **********************************************************************/
-Fusion.Widget.Pan = Class.create();
-Fusion.Widget.Pan.prototype = {
+//Fusion.Widget.Pan = Class.create();
+//Fusion.Widget.Pan.prototype = {
+Fusion.Widget.Pan = OpenLayers.Class(Fusion.Widget, Fusion.Tool.ButtonBase,
+{
initialize : function(widgetTag) {
//console.log('Pan.initialize');
- Object.inheritFrom(this, Fusion.Widget.prototype, [widgetTag, true]);
- Object.inheritFrom(this, Fusion.Tool.ButtonBase.prototype, []);
+ //Object.inheritFrom(this, Fusion.Widget.prototype, [widgetTag, true]);
+ //Object.inheritFrom(this, Fusion.Tool.ButtonBase.prototype, []);
+ Fusion.Widget.prototype.initialize.apply(this, [widgetTag, true]);
+ Fusion.Tool.ButtonBase.prototype.initialize.apply(this, []);
+
this.control = new OpenLayers.Control.DragPan();
this.getMap().oMapOL.addControl(this.control);
this.control.handler.keyMask = 0;
@@ -65,4 +70,4 @@
/*icon button*/
this._oButton.deactivateTool();
}
-};
+});
Modified: sandbox/olcore/widgets/PanOnClick.js
===================================================================
--- sandbox/olcore/widgets/PanOnClick.js 2008-04-08 18:05:14 UTC (rev 1366)
+++ sandbox/olcore/widgets/PanOnClick.js 2008-04-08 20:01:18 UTC (rev 1367)
@@ -30,8 +30,9 @@
*
* **********************************************************************/
-Fusion.Widget.PanOnClick = Class.create();
-Fusion.Widget.PanOnClick.prototype =
+//Fusion.Widget.PanOnClick = Class.create();
+//Fusion.Widget.PanOnClick.prototype =
+Fusion.Widget.Pan = OpenLayers.Class(Fusion.Widget, Fusion.Tool.ButtonBase, Fusion.Tool.ButtonBase,
{
fPercent: null,
nDeltaX: null,
@@ -39,8 +40,10 @@
initialize : function(widgetTag)
{
//console.log('FitToWindow.initialize');
- Object.inheritFrom(this, Fusion.Widget.prototype, [widgetTag, false]);
- Object.inheritFrom(this, Fusion.Tool.ButtonBase.prototype, []);
+ //Object.inheritFrom(this, Fusion.Widget.prototype, [widgetTag, false]);
+ //Object.inheritFrom(this, Fusion.Tool.ButtonBase.prototype, []);
+ Fusion.Widget.prototype.initialize.apply(this, [widgetTag, false]);
+ Fusion.Tool.ButtonBase.prototype.initialize.apply(this, []);
var json = widgetTag.extension;
@@ -84,4 +87,4 @@
fY = center.y + this.nDeltaY * (extents[3] - extents[1]) * this.fPercent;
this.getMap().zoom(fX, fY, 1);
}
-};
\ No newline at end of file
+});
\ No newline at end of file
Modified: sandbox/olcore/widgets/PanQuery.js
===================================================================
--- sandbox/olcore/widgets/PanQuery.js 2008-04-08 18:05:14 UTC (rev 1366)
+++ sandbox/olcore/widgets/PanQuery.js 2008-04-08 20:01:18 UTC (rev 1367)
@@ -33,16 +33,21 @@
Fusion.require('widgets/Pan.js');
-Fusion.Widget.PanQuery = Class.create();
-Fusion.Widget.PanQuery.prototype = {
+//Fusion.Widget.PanQuery = Class.create();
+//Fusion.Widget.PanQuery.prototype = {
+Fusion.Widget.PanQuery = OpenLayers.Class(Fusion.Widget, Fusion.Tool.ButtonBase, Fusion.Widget.Pan,
+{
selectionType: 'INTERSECTS',
nTolerance: 3,
bActiveOnly: false,
initialize : function(widgetTag) {
//console.log('PanQuery.initialize');
- Object.inheritFrom(this, Fusion.Widget.prototype, [widgetTag, true]);
- Object.inheritFrom(this, Fusion.Tool.ButtonBase.prototype, []);
- Object.inheritFrom(this, Fusion.Widget.Pan.prototype, [widgetTag]);
+ //Object.inheritFrom(this, Fusion.Widget.prototype, [widgetTag, true]);
+ //Object.inheritFrom(this, Fusion.Tool.ButtonBase.prototype, []);
+ //Object.inheritFrom(this, Fusion.Widget.Pan.prototype, [widgetTag]);
+ Fusion.Widget.prototype.initialize.apply(this, [widgetTag, true]);
+ Fusion.Tool.ButtonBase.prototype.initialize.apply(this, []);
+ Fusion.Widget.Pan.prototype.initialize.apply(this, [widgetTag]);
this.control = new OpenLayers.Control.DragPan();
this.getMap().oMapOL.addControl(this.control);
@@ -114,4 +119,4 @@
this.selectionType = value;
}
}
-};
\ No newline at end of file
+});
\ No newline at end of file
Modified: sandbox/olcore/widgets/Print.js
===================================================================
--- sandbox/olcore/widgets/Print.js 2008-04-08 18:05:14 UTC (rev 1366)
+++ sandbox/olcore/widgets/Print.js 2008-04-08 20:01:18 UTC (rev 1367)
@@ -30,11 +30,15 @@
*
* **********************************************************************/
-Fusion.Widget.Print = Class.create();
-Fusion.Widget.Print.prototype = {
+//Fusion.Widget.Print = Class.create();
+//Fusion.Widget.Print.prototype = {
+Fusion.Widget.Print = OpenLayers.Class(Fusion.Widget, Fusion.Tool.ButtonBase,
+{
initialize : function(widgetTag) {
- Object.inheritFrom(this, Fusion.Widget.prototype, [widgetTag, false]);
- Object.inheritFrom(this, Fusion.Tool.ButtonBase.prototype, []);
+ //Object.inheritFrom(this, Fusion.Widget.prototype, [widgetTag, false]);
+ //Object.inheritFrom(this, Fusion.Tool.ButtonBase.prototype, []);
+ Fusion.Widget.prototype.initialize.apply(this, [widgetTag, false]);
+ Fusion.Tool.ButtonBase.prototype.initialize.apply(this, []);
var json = widgetTag.extension;
@@ -175,4 +179,4 @@
window.open(url, 'printablepage', '');
}
-};
+});
Modified: sandbox/olcore/widgets/RefreshMap.js
===================================================================
--- sandbox/olcore/widgets/RefreshMap.js 2008-04-08 18:05:14 UTC (rev 1366)
+++ sandbox/olcore/widgets/RefreshMap.js 2008-04-08 20:01:18 UTC (rev 1367)
@@ -30,12 +30,16 @@
*
* **********************************************************************/
-Fusion.Widget.RefreshMap = Class.create();
-Fusion.Widget.RefreshMap.prototype = {
+//Fusion.Widget.RefreshMap = Class.create();
+//Fusion.Widget.RefreshMap.prototype = {
+Fusion.Widget.RefreshMap = OpenLayers.Class(Fusion.Widget, Fusion.Tool.ButtonBase,
+{
initialize : function(widgetTag) {
//console.log('RefreshMap.initialize');
- Object.inheritFrom(this, Fusion.Widget.prototype, [widgetTag, true]);
- Object.inheritFrom(this, Fusion.Tool.ButtonBase.prototype, []);
+ //Object.inheritFrom(this, Fusion.Widget.prototype, [widgetTag, true]);
+ //Object.inheritFrom(this, Fusion.Tool.ButtonBase.prototype, []);
+ Fusion.Widget.prototype.initialize.apply(this, [widgetTag, true]);
+ Fusion.Tool.ButtonBase.prototype.initialize.apply(this, []);
},
/**
@@ -45,4 +49,4 @@
var map = this.getMap();
map.redraw();
}
-};
+});
Modified: sandbox/olcore/widgets/SaveMap.js
===================================================================
--- sandbox/olcore/widgets/SaveMap.js 2008-04-08 18:05:14 UTC (rev 1366)
+++ sandbox/olcore/widgets/SaveMap.js 2008-04-08 20:01:18 UTC (rev 1367)
@@ -38,14 +38,18 @@
* </Extension>
* **********************************************************************/
-Fusion.Widget.SaveMap = Class.create();
-Fusion.Widget.SaveMap.prototype = {
+//Fusion.Widget.SaveMap = Class.create();
+//Fusion.Widget.SaveMap.prototype = {
+Fusion.Widget.SaveMap = OpenLayers.Class(Fusion.Widget, Fusion.Tool.ButtonBase,
+{
iframe : null,
printLayout : null,
printScale : null,
initialize : function(widgetTag) {
- Object.inheritFrom(this, Fusion.Widget.prototype, [widgetTag, false]);
- Object.inheritFrom(this, Fusion.Tool.ButtonBase.prototype, []);
+ //Object.inheritFrom(this, Fusion.Widget.prototype, [widgetTag, false]);
+ //Object.inheritFrom(this, Fusion.Tool.ButtonBase.prototype, []);
+ Fusion.Widget.prototype.initialize.apply(this, [widgetTag, false]);
+ Fusion.Tool.ButtonBase.prototype.initialize.apply(this, []);
var json = widgetTag.extension;
this.format = (json.Format && json.Format[0] != '')?
@@ -111,4 +115,4 @@
this.iframe.src = s;
}
}
-};
+});
Modified: sandbox/olcore/widgets/Scalebar.js
===================================================================
--- sandbox/olcore/widgets/Scalebar.js 2008-04-08 18:05:14 UTC (rev 1366)
+++ sandbox/olcore/widgets/Scalebar.js 2008-04-08 20:01:18 UTC (rev 1367)
@@ -37,8 +37,10 @@
Fusion.require('widgets/scalebar/scalebartool.js');
}
-Fusion.Widget.Scalebar = Class.create();
-Fusion.Widget.Scalebar.prototype = {
+//Fusion.Widget.Scalebar = Class.create();
+//Fusion.Widget.Scalebar.prototype = {
+Fusion.Widget.Scalebar = OpenLayers.Class(Fusion.Widget,
+{
style: 'thin',
displaySystem: 'metric',
minWidth: 100,
@@ -50,7 +52,8 @@
singleLine: false,
initialize : function(widgetTag) {
//console.log('Scalebar.initialize');
- Object.inheritFrom(this, Fusion.Widget.prototype, [widgetTag, false]);
+ //Object.inheritFrom(this, Fusion.Widget.prototype, [widgetTag, false]);
+ Fusion.Widget.prototype.initialize.apply(this, [widgetTag, false]);
var json = widgetTag.extension;
this.style = json.Style ? json.Style[0].toLowerCase() : this.style;
@@ -107,4 +110,4 @@
extentsChangedCB : function() {
this.oScaleBar.update(this.getMap().getScale());
}
-};
+});
Modified: sandbox/olcore/widgets/Search.js
===================================================================
--- sandbox/olcore/widgets/Search.js 2008-04-08 18:05:14 UTC (rev 1366)
+++ sandbox/olcore/widgets/Search.js 2008-04-08 20:01:18 UTC (rev 1367)
@@ -33,14 +33,18 @@
* (http://mapserver.commenspace.org/tools/scalebar/
* **********************************************************************/
-Fusion.Widget.Search = Class.create();
-Fusion.Widget.Search.prototype = {
+//Fusion.Widget.Search = Class.create();
+//Fusion.Widget.Search.prototype = {
+Fusion.Widget.Search = OpenLayers.Class(Fusion.Widget, Fusion.Tool.ButtonBase,
+{
sFeatures : 'menubar=no,location=no,status=no,scrollbars=yes',
initialize : function(widgetTag) {
//console.log('Search.initialize');
- Object.inheritFrom(this, Fusion.Widget.prototype, [widgetTag, false]);
- Object.inheritFrom(this, Fusion.Tool.ButtonBase.prototype, []);
+ //Object.inheritFrom(this, Fusion.Widget.prototype, [widgetTag, false]);
+ //Object.inheritFrom(this, Fusion.Tool.ButtonBase.prototype, []);
+ Fusion.Widget.prototype.initialize.apply(this, [widgetTag, false]);
+ Fusion.Tool.ButtonBase.prototype.initialize.apply(this, []);
var json = widgetTag.extension;
this.sTarget = json.Target ? json.Target[0] : "SearchWindow";
@@ -89,4 +93,4 @@
}
}
}
-};
+});
Modified: sandbox/olcore/widgets/Select.js
===================================================================
--- sandbox/olcore/widgets/Select.js 2008-04-08 18:05:14 UTC (rev 1366)
+++ sandbox/olcore/widgets/Select.js 2008-04-08 20:01:18 UTC (rev 1367)
@@ -30,8 +30,10 @@
*
* **********************************************************************/
-Fusion.Widget.Select = Class.create();
-Fusion.Widget.Select.prototype = {
+//Fusion.Widget.Select = Class.create();
+//Fusion.Widget.Select.prototype = {
+Fusion.Widget.Select = OpenLayers.Class(Fusion.Widget, Fusion.Tool.ButtonBase,
+{
selectionType: 'INTERSECTS',
nTolerance : 3, //default pixel tolernace for a point click
bActiveOnly: false, //only select feature(s) on the active layer?
@@ -39,8 +41,11 @@
initialize : function(widgetTag) {
//console.log('Select.initialize');
- Object.inheritFrom(this, Fusion.Widget.prototype, [widgetTag, true]);
- Object.inheritFrom(this, Fusion.Tool.ButtonBase.prototype, []);
+ //Object.inheritFrom(this, Fusion.Widget.prototype, [widgetTag, true]);
+ //Object.inheritFrom(this, Fusion.Tool.ButtonBase.prototype, []);
+ Fusion.Widget.prototype.initialize.apply(this, [widgetTag, true]);
+ Fusion.Tool.ButtonBase.prototype.initialize.apply(this, []);
+
//Object.inheritFrom(this, Fusion.Tool.Rectangle.prototype, []);
this.asCursor = ['auto'];
@@ -226,4 +231,4 @@
this.selectionType = value;
}
}
-};
+});
Modified: sandbox/olcore/widgets/SelectPolygon.js
===================================================================
--- sandbox/olcore/widgets/SelectPolygon.js 2008-04-08 18:05:14 UTC (rev 1366)
+++ sandbox/olcore/widgets/SelectPolygon.js 2008-04-08 20:01:18 UTC (rev 1367)
@@ -30,15 +30,21 @@
*
* **********************************************************************/
-Fusion.Widget.SelectPolygon = Class.create();
-Fusion.Widget.SelectPolygon.prototype = {
+//Fusion.Widget.SelectPolygon = Class.create();
+//Fusion.Widget.SelectPolygon.prototype = {
+Fusion.Widget.SelectPolygon = OpenLayers.Class(Fusion.Widget, Fusion.Tool.ButtonBase, Fusion.Tool.ButtonBase, Fusion.Tool.Canvas,
+{
selectionType: 'INTERSECTS',
nTolerance : 3, //default pixel tolernace for a point click
initialize : function(widgetTag) {
//console.log('Select.initialize');
- Object.inheritFrom(this, Fusion.Widget.prototype, [widgetTag, true]);
- Object.inheritFrom(this, Fusion.Tool.ButtonBase.prototype, []);
- Object.inheritFrom(this, Fusion.Tool.Canvas.prototype, []);
+ //Object.inheritFrom(this, Fusion.Widget.prototype, [widgetTag, true]);
+ //Object.inheritFrom(this, Fusion.Tool.ButtonBase.prototype, []);
+ //Object.inheritFrom(this, Fusion.Tool.Canvas.prototype, []);
+ Fusion.Widget.prototype.initialize.apply(this, [widgetTag, true]);
+ Fusion.Tool.ButtonBase.prototype.initialize.apply(this, []);
+ Fusion.Tool.Canvas.prototype.initialize.apply(this, []);
+
this.asCursor = ['auto'];
var json = widgetTag.extension;
@@ -206,4 +212,4 @@
this.selectionType = value;
}
}
-};
+});
Modified: sandbox/olcore/widgets/SelectRadius.js
===================================================================
--- sandbox/olcore/widgets/SelectRadius.js 2008-04-08 18:05:14 UTC (rev 1366)
+++ sandbox/olcore/widgets/SelectRadius.js 2008-04-08 20:01:18 UTC (rev 1367)
@@ -30,17 +30,22 @@
*
* **********************************************************************/
-Fusion.Widget.SelectRadius = Class.create();
-Fusion.Widget.SelectRadius.prototype = {
+//Fusion.Widget.SelectRadius = Class.create();
+//Fusion.Widget.SelectRadius.prototype = {
+Fusion.Widget.SelectRadius = OpenLayers.Class(Fusion.Widget, Fusion.Tool.ButtonBase, Fusion.Tool.Canvas,
+{
selectionType: 'INTERSECTS',
nTolerance : 3, //default pixel tolernace for a point click
defaultRadius: 20,
initialize : function(widgetTag) {
//console.log('Select.initialize');
- Object.inheritFrom(this, Fusion.Widget.prototype, [widgetTag, true]);
- Object.inheritFrom(this, Fusion.Tool.ButtonBase.prototype, []);
- Object.inheritFrom(this, Fusion.Tool.Canvas.prototype, []);
-
+ //Object.inheritFrom(this, Fusion.Widget.prototype, [widgetTag, true]);
+ //Object.inheritFrom(this, Fusion.Tool.ButtonBase.prototype, []);
+ //Object.inheritFrom(this, Fusion.Tool.Canvas.prototype, []);
+ Fusion.Widget.prototype.initialize.apply(this, [widgetTag, true]);
+ Fusion.Tool.ButtonBase.prototype.initialize.apply(this, []);
+ Fusion.Tool.Canvas.prototype.initialize.apply(this, []);
+
this.asCursor = ['auto'];
var json = widgetTag.extension;
@@ -265,4 +270,4 @@
this.selectionType = value;
}
}
-};
+});
Modified: sandbox/olcore/widgets/SelectRadiusValue.js
===================================================================
--- sandbox/olcore/widgets/SelectRadiusValue.js 2008-04-08 18:05:14 UTC (rev 1366)
+++ sandbox/olcore/widgets/SelectRadiusValue.js 2008-04-08 20:01:18 UTC (rev 1367)
@@ -31,14 +31,18 @@
*
* **********************************************************************/
-Fusion.Widget.SelectRadiusValue = Class.create();
-Fusion.Widget.SelectRadiusValue.prototype = {
+//Fusion.Widget.SelectRadiusValue = Class.create();
+//Fusion.Widget.SelectRadiusValue.prototype = {
+
+Fusion.Widget.SelectRadiusValue = OpenLayers.Class(Fusion.Widget,
+{
radiusWidgetName: null,
label: '',
className: '',
domLabel: null,
initialize : function(widgetTag) {
- Object.inheritFrom(this, Fusion.Widget.prototype, [widgetTag, false]);
+ //Object.inheritFrom(this, Fusion.Widget.prototype, [widgetTag, false]);
+ Fusion.Widget.prototype.initialize.apply(this, [widgetTag, false]);
/* parse widget properties */
var json = widgetTag.extension;
@@ -100,4 +104,4 @@
this.input.value = this.getMap().pixToGeoMeasure(this.widget.getRadius());
}
}
-};
\ No newline at end of file
+});
\ No newline at end of file
Modified: sandbox/olcore/widgets/SelectWithin.js
===================================================================
--- sandbox/olcore/widgets/SelectWithin.js 2008-04-08 18:05:14 UTC (rev 1366)
+++ sandbox/olcore/widgets/SelectWithin.js 2008-04-08 20:01:18 UTC (rev 1367)
@@ -30,14 +30,18 @@
*
* **********************************************************************/
-Fusion.Widget.SelectWithin = Class.create();
-Fusion.Widget.SelectWithin.prototype = {
+//Fusion.Widget.SelectWithin = Class.create();
+//Fusion.Widget.SelectWithin.prototype = {
+Fusion.Widget.SelectWithin = OpenLayers.Class(Fusion.Widget, Fusion.Tool.ButtonBase,
+{
sFeatures : 'menubar=no,location=no,resizable=no,status=no',
initialize : function(widgetTag) {
//console.log('SelectWithin.initialize');
- Object.inheritFrom(this, Fusion.Widget.prototype, [widgetTag, true]);
- Object.inheritFrom(this, Fusion.Tool.ButtonBase.prototype, []);
+ //Object.inheritFrom(this, Fusion.Widget.prototype, [widgetTag, true]);
+ //Object.inheritFrom(this, Fusion.Tool.ButtonBase.prototype, []);
+ Fusion.Widget.prototype.initialize.apply(this, [widgetTag, true]);
+ Fusion.Tool.ButtonBase.prototype.initialize.apply(this, []);
var json = widgetTag.extension;
this.sTarget = json.Target ? json.Target[0] : "SelectWithinWindow";
@@ -124,4 +128,4 @@
}
}
}
-};
+});
Modified: sandbox/olcore/widgets/SelectionInfo.js
===================================================================
--- sandbox/olcore/widgets/SelectionInfo.js 2008-04-08 18:05:14 UTC (rev 1366)
+++ sandbox/olcore/widgets/SelectionInfo.js 2008-04-08 20:01:18 UTC (rev 1367)
@@ -43,15 +43,17 @@
* & is &
* **********************************************************************/
-Fusion.Widget.SelectionInfo = Class.create();
-Fusion.Widget.SelectionInfo.prototype = {
+//Fusion.Widget.SelectionInfo = Class.create();
+//Fusion.Widget.SelectionInfo.prototype = {
+Fusion.Widget.SelectionInfo = OpenLayers.Class(Fusion.Widget,
+{
defaultTemplate: 'selectionInfo',
domSpan: null,
initialize : function(widgetTag) {
//console.log('SelectionInfo.initialize');
- Object.inheritFrom(this, Fusion.Widget.prototype, [widgetTag, true]);
-
+ //Object.inheritFrom(this, Fusion.Widget.prototype, [widgetTag, true]);
+ Fusion.Widget.prototype.initialize.apply(this, [widgetTag, true]);
var json = widgetTag.extension;
@@ -85,4 +87,4 @@
this.domSpan.innerHTML = OpenLayers.i18n(this.emptyText);
}
}
-};
+});
Modified: sandbox/olcore/widgets/SelectionPanel.js
===================================================================
--- sandbox/olcore/widgets/SelectionPanel.js 2008-04-08 18:05:14 UTC (rev 1366)
+++ sandbox/olcore/widgets/SelectionPanel.js 2008-04-08 20:01:18 UTC (rev 1367)
@@ -30,12 +30,14 @@
*
* **********************************************************************/
-Fusion.Widget.SelectionPanel = Class.create();
-Fusion.Widget.SelectionPanel.prototype = {
-
+//Fusion.Widget.SelectionPanel = Class.create();
+//Fusion.Widget.SelectionPanel.prototype = {
+Fusion.Widget.SelectionPanel = OpenLayers.Class(Fusion.Widget,
+{
initialize : function(widgetTag) {
//console.log('SelectionPanel.initialize');
- Object.inheritFrom(this, Fusion.Widget.prototype, [widgetTag, false]);
+ // Object.inheritFrom(this, Fusion.Widget.prototype, [widgetTag, false]);
+ Fusion.Widget.prototype.initialize.apply(this, [widgetTag, false]);
this.defPrevTaskIcon = 'images/icon_back.gif';
this.defNextTaskIcon = 'images/icon_forward.gif';
@@ -178,4 +180,4 @@
this.featureDiv.innerHTML = '';
this.featureDiv.appendChild(table);
}
-};
+});
Modified: sandbox/olcore/widgets/TaskPane.js
===================================================================
--- sandbox/olcore/widgets/TaskPane.js 2008-04-08 18:05:14 UTC (rev 1366)
+++ sandbox/olcore/widgets/TaskPane.js 2008-04-08 20:01:18 UTC (rev 1367)
@@ -29,8 +29,9 @@
* A utility widget that holds output from other widgets.
****************************************************************************/
-Fusion.Widget.TaskPane = Class.create();
-Fusion.Widget.TaskPane.prototype =
+//Fusion.Widget.TaskPane = Class.create();
+//Fusion.Widget.TaskPane.prototype =
+Fusion.Widget.TaskPane = OpenLayers.Class(Fusion.Widget,
{
aExecutedTasks: null, //array of URLs for tasks execcuted in the TaskPane
nCurrentTask: 0,
@@ -42,7 +43,8 @@
initialize : function(widgetTag)
{
//console.log('TaskPane.initialize');
- Object.inheritFrom(this, Fusion.Widget.prototype, [widgetTag, true]);
+ //Object.inheritFrom(this, Fusion.Widget.prototype, [widgetTag, true]);
+ Fusion.Widget.prototype.initialize.apply(this, [widgetTag, true]);
this.aExecutedTasks = [];
this.defHomeIcon = 'images/icon_home.png';
@@ -186,4 +188,4 @@
}
}
-};
+});
Modified: sandbox/olcore/widgets/ViewOptions.js
===================================================================
--- sandbox/olcore/widgets/ViewOptions.js 2008-04-08 18:05:14 UTC (rev 1366)
+++ sandbox/olcore/widgets/ViewOptions.js 2008-04-08 20:01:18 UTC (rev 1367)
@@ -29,8 +29,9 @@
* A widget to allow selection of the display units for various widgets
****************************************************************************/
-Fusion.Widget.ViewOptions = Class.create();
-Fusion.Widget.ViewOptions.prototype =
+//Fusion.Widget.ViewOptions = Class.create();
+//Fusion.Widget.ViewOptions.prototype =
+Fusion.Widget.ViewOptions = OpenLayers.Class(Fusion.Widget, Fusion.Tool.MenuBase,
{
displayUnits: false,
options : {
@@ -41,8 +42,11 @@
initialize : function(widgetTag) {
//console.log('ViewOptions.initialize');
- Object.inheritFrom(this, Fusion.Widget.prototype, [widgetTag, true]);
- Object.inheritFrom(this, Fusion.Tool.MenuBase.prototype, []);
+ //Object.inheritFrom(this, Fusion.Widget.prototype, [widgetTag, true]);
+ //Object.inheritFrom(this, Fusion.Tool.MenuBase.prototype, []);
+ Fusion.Widget.prototype.initialize.apply(this, [widgetTag, true]);
+ Fusion.Tool.MenuBase.prototype.initialize.apply(this, []);
+
//this.enable();
var json = widgetTag.extension;
@@ -82,4 +86,4 @@
}
}
}
-};
+});
Modified: sandbox/olcore/widgets/ViewSize.js
===================================================================
--- sandbox/olcore/widgets/ViewSize.js 2008-04-08 18:05:14 UTC (rev 1366)
+++ sandbox/olcore/widgets/ViewSize.js 2008-04-08 20:01:18 UTC (rev 1367)
@@ -29,8 +29,10 @@
* Display the size of the current view in user-definable units
****************************************************************************/
-Fusion.Widget.ViewSize = Class.create();
-Fusion.Widget.ViewSize.prototype = {
+//Fusion.Widget.ViewSize = Class.create();
+//Fusion.Widget.ViewSize.prototype = {
+Fusion.Widget.ViewSize = OpenLayers.Class(Fusion.Widget,
+{
defaultTemplate: 'x: {x}, y: {y}',
domSpan: null,
@@ -38,8 +40,9 @@
units: Fusion.UNKNOWN,
initialize : function(widgetTag) {
- Object.inheritFrom(this, Fusion.Widget.prototype, [widgetTag, true]);
-
+ //Object.inheritFrom(this, Fusion.Widget.prototype, [widgetTag, true]);
+ Fusion.Widget.prototype.initialize.apply(this, [widgetTag, true]);
+
this.emptyText = this.domObj.innerHTML;
var json = widgetTag.extension;
@@ -93,4 +96,4 @@
this.updateViewSize();
}
}
-};
+});
Modified: sandbox/olcore/widgets/Zoom.js
===================================================================
--- sandbox/olcore/widgets/Zoom.js 2008-04-08 18:05:14 UTC (rev 1366)
+++ sandbox/olcore/widgets/Zoom.js 2008-04-08 20:01:18 UTC (rev 1367)
@@ -30,8 +30,9 @@
*
* **********************************************************************/
-Fusion.Widget.Zoom = Class.create();
-Fusion.Widget.Zoom.prototype =
+//Fusion.Widget.Zoom = Class.create();
+//Fusion.Widget.Zoom.prototype =
+Fusion.Widget.Zoom = OpenLayers.Class(Fusion.Widget,
{
nTolerance : 5,
nFactor : 2,
@@ -40,9 +41,11 @@
initialize : function(widgetTag)
{
//console.log('Zoom.initialize');
- Object.inheritFrom(this, Fusion.Widget.prototype, [widgetTag, true]);
- Object.inheritFrom(this, Fusion.Tool.ButtonBase.prototype, []);
-
+ //Object.inheritFrom(this, Fusion.Widget.prototype, [widgetTag, true]);
+ //Object.inheritFrom(this, Fusion.Tool.ButtonBase.prototype, []);
+ Fusion.Widget.prototype.initialize.apply(this, [widgetTag, true]);
+ Fusion.Tool.ButtonBase.prototype.initialize.apply(this, []);
+
this.asCursor = ["url('images/zoomin.cur'),auto",'-moz-zoom-in', 'auto'];
var json = widgetTag.extension;
this.nTolerance = json.Tolerance ? json.Tolerance[0] : this.nTolerance;
@@ -184,4 +187,4 @@
this.handler.activate();
}
}
-};
+});
Modified: sandbox/olcore/widgets/ZoomOnClick.js
===================================================================
--- sandbox/olcore/widgets/ZoomOnClick.js 2008-04-08 18:05:14 UTC (rev 1366)
+++ sandbox/olcore/widgets/ZoomOnClick.js 2008-04-08 20:01:18 UTC (rev 1367)
@@ -30,15 +30,18 @@
*
* **********************************************************************/
-Fusion.Widget.ZoomOnClick = Class.create();
-Fusion.Widget.ZoomOnClick.prototype =
+//Fusion.Widget.ZoomOnClick = Class.create();
+//Fusion.Widget.ZoomOnClick.prototype =
+Fusion.Widget.ZoomOnClick = OpenLayers.Class(Fusion.Widget, Fusion.Tool.ButtonBase,
{
nFactor: 4,
initialize : function(widgetTag)
{
//console.log('ZoomOnClick.initialize');
- Object.inheritFrom(this, Fusion.Widget.prototype, [widgetTag, false]);
- Object.inheritFrom(this, Fusion.Tool.ButtonBase.prototype, []);
+ //Object.inheritFrom(this, Fusion.Widget.prototype, [widgetTag, false]);
+ //Object.inheritFrom(this, Fusion.Tool.ButtonBase.prototype, []);
+ Fusion.Widget.prototype.initialize.apply(this, [widgetTag, false]);
+ Fusion.Tool.ButtonBase.prototype.initialize.apply(this, []);
var json = widgetTag.extension;
this.nFactor = parseFloat(json.Factor ? json.Factor[0] : this.nFactor);
@@ -61,4 +64,4 @@
this.nFactor = value;
}
}
-};
+});
Modified: sandbox/olcore/widgets/ZoomToSelection.js
===================================================================
--- sandbox/olcore/widgets/ZoomToSelection.js 2008-04-08 18:05:14 UTC (rev 1366)
+++ sandbox/olcore/widgets/ZoomToSelection.js 2008-04-08 20:01:18 UTC (rev 1367)
@@ -30,12 +30,16 @@
*
* **********************************************************************/
-Fusion.Widget.ZoomToSelection = Class.create();
-Fusion.Widget.ZoomToSelection.prototype = {
+//Fusion.Widget.ZoomToSelection = Class.create();
+//Fusion.Widget.ZoomToSelection.prototype = {
+Fusion.Widget.ZoomToSelection = OpenLayers.Class(Fusion.Widget, Fusion.Tool.ButtonBase,
+{
initialize : function(widgetTag) {
//console.log('ZoomToSelection.initialize');
- Object.inheritFrom(this, Fusion.Widget.prototype, [widgetTag, false]);
- Object.inheritFrom(this, Fusion.Tool.ButtonBase.prototype, []);
+ //Object.inheritFrom(this, Fusion.Widget.prototype, [widgetTag, false]);
+ //Object.inheritFrom(this, Fusion.Tool.ButtonBase.prototype, []);
+ Fusion.Widget.prototype.initialize.apply(this, [widgetTag, false]);
+ Fusion.Tool.ButtonBase.prototype.initialize.apply(this, []);
var json = widgetTag.extension;
this.maxDimension = json.MaximumZoomDimension ? json.MaximumZoomDimension[0] : -1;
@@ -84,4 +88,4 @@
}
}
-};
+});
More information about the fusion-commits
mailing list