mirror of
https://github.com/django/django.git
synced 2024-12-22 17:16:24 +00:00
Fixed JavaScript "dot-notation" violations.
This commit is contained in:
parent
8a99c01184
commit
ec6563f585
@ -2,7 +2,7 @@
|
||||
"rules": {
|
||||
"camelcase": [1, {"properties": "always"}],
|
||||
"comma-spacing": [2, {"before": false, "after": true}],
|
||||
"dot-notation": [1, {"allowKeywords": true}],
|
||||
"dot-notation": [2, {"allowKeywords": true}],
|
||||
"curly": [2, "all"],
|
||||
"indent": [
|
||||
2,
|
||||
|
@ -169,12 +169,12 @@
|
||||
this.wkt_f = new OpenLayers.Format.DjangoWKT();
|
||||
|
||||
// Mapping from OGRGeomType name to OpenLayers.Geometry name
|
||||
if (options['geom_name'] === 'Unknown') {
|
||||
options['geom_type'] = OpenLayers.Geometry;
|
||||
} else if (options['geom_name'] === 'GeometryCollection') {
|
||||
options['geom_type'] = OpenLayers.Geometry.Collection;
|
||||
if (options.geom_name === 'Unknown') {
|
||||
options.geom_type = OpenLayers.Geometry;
|
||||
} else if (options.geom_name === 'GeometryCollection') {
|
||||
options.geom_type = OpenLayers.Geometry.Collection;
|
||||
} else {
|
||||
options['geom_type'] = eval('OpenLayers.Geometry.' + options['geom_name']);
|
||||
options.geom_type = eval('OpenLayers.Geometry.' + options.geom_name);
|
||||
}
|
||||
|
||||
// Default options
|
||||
@ -183,7 +183,7 @@
|
||||
default_lat: 0,
|
||||
default_lon: 0,
|
||||
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,
|
||||
map_options: {},
|
||||
map_srid: 4326,
|
||||
@ -210,9 +210,9 @@
|
||||
'strokeColor': '#' + this.options.color
|
||||
};
|
||||
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.map.addLayer(this.layers.vector);
|
||||
var wkt = document.getElementById(this.options.id).value;
|
||||
|
Loading…
Reference in New Issue
Block a user