[OpenLayers-Commits] r2336 - in sandbox/vector-2.4/lib/OpenLayers: . Feature Geometry Layer Renderer
commits at openlayers.org
commits at openlayers.org
Mon Mar 5 14:37:03 EST 2007
Author: crschmidt
Date: 2007-03-05 14:36:59 -0500 (Mon, 05 Mar 2007)
New Revision: 2336
Modified:
sandbox/vector-2.4/lib/OpenLayers/Feature/Vector.js
sandbox/vector-2.4/lib/OpenLayers/Geometry.js
sandbox/vector-2.4/lib/OpenLayers/Geometry/Aggregate.js
sandbox/vector-2.4/lib/OpenLayers/Geometry/CubicBezierCurve.js
sandbox/vector-2.4/lib/OpenLayers/Geometry/Curve.js
sandbox/vector-2.4/lib/OpenLayers/Geometry/LineSegment.js
sandbox/vector-2.4/lib/OpenLayers/Geometry/LineString.js
sandbox/vector-2.4/lib/OpenLayers/Geometry/LinearRing.js
sandbox/vector-2.4/lib/OpenLayers/Geometry/MultiLineString.js
sandbox/vector-2.4/lib/OpenLayers/Geometry/MultiPoint.js
sandbox/vector-2.4/lib/OpenLayers/Geometry/MultiPolygon.js
sandbox/vector-2.4/lib/OpenLayers/Geometry/Point.js
sandbox/vector-2.4/lib/OpenLayers/Geometry/Polygon.js
sandbox/vector-2.4/lib/OpenLayers/Geometry/Rectangle.js
sandbox/vector-2.4/lib/OpenLayers/Geometry/Surface.js
sandbox/vector-2.4/lib/OpenLayers/Layer/Vector.js
sandbox/vector-2.4/lib/OpenLayers/Renderer.js
sandbox/vector-2.4/lib/OpenLayers/Renderer/Canvas.js
sandbox/vector-2.4/lib/OpenLayers/Renderer/SVG.js
sandbox/vector-2.4/lib/OpenLayers/Renderer/VML.js
Log:
Set eol-style to native on all these files we've added.
Modified: sandbox/vector-2.4/lib/OpenLayers/Feature/Vector.js
===================================================================
--- sandbox/vector-2.4/lib/OpenLayers/Feature/Vector.js 2007-03-05 19:34:04 UTC (rev 2335)
+++ sandbox/vector-2.4/lib/OpenLayers/Feature/Vector.js 2007-03-05 19:36:59 UTC (rev 2336)
@@ -1,249 +1,249 @@
-/* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license.
- * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt
- * for the full text of the license. */
-
-// TRASH THIS
-OpenLayers.State = {
- /** states */
- UNKNOWN: 'Unknown',
- INSERT: 'Insert',
- UPDATE: 'Update',
- DELETE: 'Delete'
-}
-
-/**
- * @class
- *
- * @requires OpenLayers/Util.js
- */
-OpenLayers.Feature.Vector = OpenLayers.Class.create();
-OpenLayers.Feature.Vector.prototype =
- OpenLayers.Class.inherit( OpenLayers.Feature, {
-
- /** @type String */
- fid: null,
-
- /** @type OpenLayers.Geometry */
- geometry:null,
-
- /** @type array */
- attributes: null,
-
- /** @type strinng */
- state: null,
-
- /**
- * @constructor
- *
- * @param {OpenLayers.Layer} layer
- * @param {OpenLayers.Geometry} geometry
- * @param {Object} data
- */
- initialize: function(layer, geometry, data) {
- OpenLayers.Feature.prototype.initialize.apply(this, [layer, null, data]);
- this.lonlat = null;
- this.setGeometry(geometry);
- this.state = null;
- },
-
-
- /**
- * @returns An exact clone of this OpenLayers.Feature
- * @type OpenLayers.Feature
- */
- clone: function (obj) {
- if (obj == null) {
- obj = new OpenLayers.Feature(null, this.geometry.clone(), this.data);
- }
-
- // catch any randomly tagged-on properties
- OpenLayers.Util.applyDefaults(obj, this);
-
- return obj;
- },
-
- /**
- *
- */
- destroy: function() {
- this.geometry = null;
- OpenLayers.Feature.prototype.destroy.apply(this, arguments);
- },
-
- /**
- * HACK - we need to rewrite this for non-point geometry
- * @returns null - we need to rewrite this for non-point geometry
- * @type Boolean
- */
- onScreen:function() {
- return null;
- },
-
- /**
- *
- * HACK - we need to decide if all vector features should be able to
- * create markers
- *
- * @returns null
- *
- * @type OpenLayers.Marker
- */
- createMarker: function() {
- return null;
- },
-
- /**
- * HACK - we need to decide if all vector features should be able to
- * delete markers
- *
- * If user overrides the createMarker() function, s/he should be able
- * to also specify an alternative function for destroying it
- */
- destroyMarker: function() {
- // pass
- },
-
- /**
- * HACK - we need to decide if all vector features should be able to
- * create popups
- *
- * @returns null
- */
- createPopup: function() {
- return null;
- },
-
- /**
- * Set a feature id to the feature
- *
- * @param {String} feature id to set
- */
- setFid: function(fid) {
- this.fid = fid;
- },
-
- /**
- * Set a geometry to the feature
- *
- * @param {OpenLayers.Geometry} geometry to set
- */
- setGeometry: function(geometry) {
- if(geometry){
- this.geometry = geometry;
- this.geometry.feature = this;
- this._setGeometryFeatureReference(this.geometry, this);
- }
- },
-
- /**
- * Sets recursively the reference to the feature in the geometry
- *
- * @param {OpenLayers.Geometry}
- * @param {OpenLayers.Feature}
- */
- _setGeometryFeatureReference: function(geometry, feature) {
- geometry.feature = feature;
- if (geometry.components) {
- for (var i = 0; i < geometry.components.length; i++) {
- this._setGeometryFeatureReference(geometry.components[i], feature);
- }
- }
- },
-
- /**
- * Adds attributes an attributes object to the feature.
- * (should not be in geometry but in feature class)
- *
- * @param {Attributes} attributes
- */
- setAttributes: function(attributes) {
- this.attributes=attributes;
- },
-
- /**
- * Takes an lonLat point and returns true if the feature is at this location.
- * @param {OpenLayers.LonLat} lonlat
- * @param toleranceLon Optional tolerance in Geometric Coords
- * @param toleranceLat Optional tolerance in Geographic Coords
- * @return Boolean
- */
- atPoint: function(lonlat,toleranceLon,toleranceLat){
- var atPoint=false;
- if(this.geometry){
- atPoint=this.geometry.atPoint(lonlat,toleranceLon,toleranceLat);
- }
- return atPoint;
- },
-
- /**
- * Set geometry style
- *
- * @param {OpenLayers.Style} attributes to remove, can be an array
- */
- setStyle: function(style) {
- this.style = style;
- },
-
- /**
- * Get the current geometry style
- *
- */
- getStyle: function() {
- return style;
- },
-
- /**
- *
- * HACK - we need to decide if all vector features should be able to
- * delete popups
- */
- destroyPopup: function() {
- // pass
- },
-
- /**
- * Sets the new state
- * @param {String} state
- */
- toState: function(state) {
- if (state == OpenLayers.State.UPDATE) {
- switch (this.state) {
- case OpenLayers.State.UNKNOWN:
- case OpenLayers.State.DELETE:
- this.state = state;
- break;
- case OpenLayers.State.UPDATE:
- case OpenLayers.State.INSERT:
- break;
- }
- } else if (state == OpenLayers.State.INSERT) {
- switch (this.state) {
- case OpenLayers.State.UNKNOWN:
- break;
- default:
- this.state = state;
- break;
- }
- } else if (state == OpenLayers.State.DELETE) {
- switch (this.state) {
- case OpenLayers.State.INSERT:
- // the feature should be destroyed
- break;
- case OpenLayers.State.DELETE:
- break;
- case OpenLayers.State.UNKNOWN:
- case OpenLayers.State.UPDATE:
- this.state = state;
- break;
- }
- } else if (state == OpenLayers.State.UNKNOWN) {
- this.state = state;
- }
- },
-
- destroy: function() {
-
- },
-
- CLASS_NAME: "OpenLayers.Feature.Vector"
-});
+/* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license.
+ * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt
+ * for the full text of the license. */
+
+// TRASH THIS
+OpenLayers.State = {
+ /** states */
+ UNKNOWN: 'Unknown',
+ INSERT: 'Insert',
+ UPDATE: 'Update',
+ DELETE: 'Delete'
+}
+
+/**
+ * @class
+ *
+ * @requires OpenLayers/Util.js
+ */
+OpenLayers.Feature.Vector = OpenLayers.Class.create();
+OpenLayers.Feature.Vector.prototype =
+ OpenLayers.Class.inherit( OpenLayers.Feature, {
+
+ /** @type String */
+ fid: null,
+
+ /** @type OpenLayers.Geometry */
+ geometry:null,
+
+ /** @type array */
+ attributes: null,
+
+ /** @type strinng */
+ state: null,
+
+ /**
+ * @constructor
+ *
+ * @param {OpenLayers.Layer} layer
+ * @param {OpenLayers.Geometry} geometry
+ * @param {Object} data
+ */
+ initialize: function(layer, geometry, data) {
+ OpenLayers.Feature.prototype.initialize.apply(this, [layer, null, data]);
+ this.lonlat = null;
+ this.setGeometry(geometry);
+ this.state = null;
+ },
+
+
+ /**
+ * @returns An exact clone of this OpenLayers.Feature
+ * @type OpenLayers.Feature
+ */
+ clone: function (obj) {
+ if (obj == null) {
+ obj = new OpenLayers.Feature(null, this.geometry.clone(), this.data);
+ }
+
+ // catch any randomly tagged-on properties
+ OpenLayers.Util.applyDefaults(obj, this);
+
+ return obj;
+ },
+
+ /**
+ *
+ */
+ destroy: function() {
+ this.geometry = null;
+ OpenLayers.Feature.prototype.destroy.apply(this, arguments);
+ },
+
+ /**
+ * HACK - we need to rewrite this for non-point geometry
+ * @returns null - we need to rewrite this for non-point geometry
+ * @type Boolean
+ */
+ onScreen:function() {
+ return null;
+ },
+
+ /**
+ *
+ * HACK - we need to decide if all vector features should be able to
+ * create markers
+ *
+ * @returns null
+ *
+ * @type OpenLayers.Marker
+ */
+ createMarker: function() {
+ return null;
+ },
+
+ /**
+ * HACK - we need to decide if all vector features should be able to
+ * delete markers
+ *
+ * If user overrides the createMarker() function, s/he should be able
+ * to also specify an alternative function for destroying it
+ */
+ destroyMarker: function() {
+ // pass
+ },
+
+ /**
+ * HACK - we need to decide if all vector features should be able to
+ * create popups
+ *
+ * @returns null
+ */
+ createPopup: function() {
+ return null;
+ },
+
+ /**
+ * Set a feature id to the feature
+ *
+ * @param {String} feature id to set
+ */
+ setFid: function(fid) {
+ this.fid = fid;
+ },
+
+ /**
+ * Set a geometry to the feature
+ *
+ * @param {OpenLayers.Geometry} geometry to set
+ */
+ setGeometry: function(geometry) {
+ if(geometry){
+ this.geometry = geometry;
+ this.geometry.feature = this;
+ this._setGeometryFeatureReference(this.geometry, this);
+ }
+ },
+
+ /**
+ * Sets recursively the reference to the feature in the geometry
+ *
+ * @param {OpenLayers.Geometry}
+ * @param {OpenLayers.Feature}
+ */
+ _setGeometryFeatureReference: function(geometry, feature) {
+ geometry.feature = feature;
+ if (geometry.components) {
+ for (var i = 0; i < geometry.components.length; i++) {
+ this._setGeometryFeatureReference(geometry.components[i], feature);
+ }
+ }
+ },
+
+ /**
+ * Adds attributes an attributes object to the feature.
+ * (should not be in geometry but in feature class)
+ *
+ * @param {Attributes} attributes
+ */
+ setAttributes: function(attributes) {
+ this.attributes=attributes;
+ },
+
+ /**
+ * Takes an lonLat point and returns true if the feature is at this location.
+ * @param {OpenLayers.LonLat} lonlat
+ * @param toleranceLon Optional tolerance in Geometric Coords
+ * @param toleranceLat Optional tolerance in Geographic Coords
+ * @return Boolean
+ */
+ atPoint: function(lonlat,toleranceLon,toleranceLat){
+ var atPoint=false;
+ if(this.geometry){
+ atPoint=this.geometry.atPoint(lonlat,toleranceLon,toleranceLat);
+ }
+ return atPoint;
+ },
+
+ /**
+ * Set geometry style
+ *
+ * @param {OpenLayers.Style} attributes to remove, can be an array
+ */
+ setStyle: function(style) {
+ this.style = style;
+ },
+
+ /**
+ * Get the current geometry style
+ *
+ */
+ getStyle: function() {
+ return style;
+ },
+
+ /**
+ *
+ * HACK - we need to decide if all vector features should be able to
+ * delete popups
+ */
+ destroyPopup: function() {
+ // pass
+ },
+
+ /**
+ * Sets the new state
+ * @param {String} state
+ */
+ toState: function(state) {
+ if (state == OpenLayers.State.UPDATE) {
+ switch (this.state) {
+ case OpenLayers.State.UNKNOWN:
+ case OpenLayers.State.DELETE:
+ this.state = state;
+ break;
+ case OpenLayers.State.UPDATE:
+ case OpenLayers.State.INSERT:
+ break;
+ }
+ } else if (state == OpenLayers.State.INSERT) {
+ switch (this.state) {
+ case OpenLayers.State.UNKNOWN:
+ break;
+ default:
+ this.state = state;
+ break;
+ }
+ } else if (state == OpenLayers.State.DELETE) {
+ switch (this.state) {
+ case OpenLayers.State.INSERT:
+ // the feature should be destroyed
+ break;
+ case OpenLayers.State.DELETE:
+ break;
+ case OpenLayers.State.UNKNOWN:
+ case OpenLayers.State.UPDATE:
+ this.state = state;
+ break;
+ }
+ } else if (state == OpenLayers.State.UNKNOWN) {
+ this.state = state;
+ }
+ },
+
+ destroy: function() {
+
+ },
+
+ CLASS_NAME: "OpenLayers.Feature.Vector"
+});
Property changes on: sandbox/vector-2.4/lib/OpenLayers/Feature/Vector.js
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: sandbox/vector-2.4/lib/OpenLayers/Geometry/Aggregate.js
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: sandbox/vector-2.4/lib/OpenLayers/Geometry/CubicBezierCurve.js
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: sandbox/vector-2.4/lib/OpenLayers/Geometry/Curve.js
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: sandbox/vector-2.4/lib/OpenLayers/Geometry/LineSegment.js
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: sandbox/vector-2.4/lib/OpenLayers/Geometry/LineString.js
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: sandbox/vector-2.4/lib/OpenLayers/Geometry/LinearRing.js
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: sandbox/vector-2.4/lib/OpenLayers/Geometry/MultiLineString.js
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: sandbox/vector-2.4/lib/OpenLayers/Geometry/MultiPoint.js
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: sandbox/vector-2.4/lib/OpenLayers/Geometry/MultiPolygon.js
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: sandbox/vector-2.4/lib/OpenLayers/Geometry/Point.js
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: sandbox/vector-2.4/lib/OpenLayers/Geometry/Polygon.js
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: sandbox/vector-2.4/lib/OpenLayers/Geometry/Rectangle.js
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: sandbox/vector-2.4/lib/OpenLayers/Geometry/Surface.js
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: sandbox/vector-2.4/lib/OpenLayers/Geometry.js
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: sandbox/vector-2.4/lib/OpenLayers/Layer/Vector.js
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: sandbox/vector-2.4/lib/OpenLayers/Renderer/Canvas.js
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: sandbox/vector-2.4/lib/OpenLayers/Renderer/SVG.js
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: sandbox/vector-2.4/lib/OpenLayers/Renderer/VML.js
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: sandbox/vector-2.4/lib/OpenLayers/Renderer.js
___________________________________________________________________
Name: svn:eol-style
+ native
More information about the Commits
mailing list