mirror of
https://github.com/django/django.git
synced 2024-12-23 01:25:58 +00:00
Fixed JavaScript "dot-notation" violations.
This commit is contained in:
parent
8a99c01184
commit
ec6563f585
@ -2,7 +2,7 @@
|
|||||||
"rules": {
|
"rules": {
|
||||||
"camelcase": [1, {"properties": "always"}],
|
"camelcase": [1, {"properties": "always"}],
|
||||||
"comma-spacing": [2, {"before": false, "after": true}],
|
"comma-spacing": [2, {"before": false, "after": true}],
|
||||||
"dot-notation": [1, {"allowKeywords": true}],
|
"dot-notation": [2, {"allowKeywords": true}],
|
||||||
"curly": [2, "all"],
|
"curly": [2, "all"],
|
||||||
"indent": [
|
"indent": [
|
||||||
2,
|
2,
|
||||||
|
@ -169,12 +169,12 @@
|
|||||||
this.wkt_f = new OpenLayers.Format.DjangoWKT();
|
this.wkt_f = new OpenLayers.Format.DjangoWKT();
|
||||||
|
|
||||||
// Mapping from OGRGeomType name to OpenLayers.Geometry name
|
// Mapping from OGRGeomType name to OpenLayers.Geometry name
|
||||||
if (options['geom_name'] === 'Unknown') {
|
if (options.geom_name === 'Unknown') {
|
||||||
options['geom_type'] = OpenLayers.Geometry;
|
options.geom_type = OpenLayers.Geometry;
|
||||||
} else if (options['geom_name'] === 'GeometryCollection') {
|
} else if (options.geom_name === 'GeometryCollection') {
|
||||||
options['geom_type'] = OpenLayers.Geometry.Collection;
|
options.geom_type = OpenLayers.Geometry.Collection;
|
||||||
} else {
|
} else {
|
||||||
options['geom_type'] = eval('OpenLayers.Geometry.' + options['geom_name']);
|
options.geom_type = eval('OpenLayers.Geometry.' + options.geom_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Default options
|
// Default options
|
||||||
@ -183,7 +183,7 @@
|
|||||||
default_lat: 0,
|
default_lat: 0,
|
||||||
default_lon: 0,
|
default_lon: 0,
|
||||||
default_zoom: 4,
|
default_zoom: 4,
|
||||||
is_collection: new options['geom_type']() instanceof OpenLayers.Geometry.Collection,
|
is_collection: new options.geom_type() instanceof OpenLayers.Geometry.Collection,
|
||||||
layerswitcher: false,
|
layerswitcher: false,
|
||||||
map_options: {},
|
map_options: {},
|
||||||
map_srid: 4326,
|
map_srid: 4326,
|
||||||
@ -210,9 +210,9 @@
|
|||||||
'strokeColor': '#' + this.options.color
|
'strokeColor': '#' + this.options.color
|
||||||
};
|
};
|
||||||
if (this.options.geom_name === 'LineString') {
|
if (this.options.geom_name === 'LineString') {
|
||||||
defaults_style['strokeWidth'] = 3;
|
defaults_style.strokeWidth = 3;
|
||||||
}
|
}
|
||||||
var styleMap = new OpenLayers.StyleMap({'default': OpenLayers.Util.applyDefaults(defaults_style, OpenLayers.Feature.Vector.style['default'])});
|
var styleMap = new OpenLayers.StyleMap({'default': OpenLayers.Util.applyDefaults(defaults_style, OpenLayers.Feature.Vector.style.default)});
|
||||||
this.layers.vector = new OpenLayers.Layer.Vector(" " + this.options.name, {styleMap: styleMap});
|
this.layers.vector = new OpenLayers.Layer.Vector(" " + this.options.name, {styleMap: styleMap});
|
||||||
this.map.addLayer(this.layers.vector);
|
this.map.addLayer(this.layers.vector);
|
||||||
var wkt = document.getElementById(this.options.id).value;
|
var wkt = document.getElementById(this.options.id).value;
|
||||||
|
Loading…
Reference in New Issue
Block a user