highlight secondary layers when they're active for editing
This commit is contained in:
parent
e63ce7f1ea
commit
c7fa53be5d
1 changed files with 10 additions and 4 deletions
|
@ -314,11 +314,17 @@ editor = {
|
||||||
_get_geometry_style: function (feature) {
|
_get_geometry_style: function (feature) {
|
||||||
// style callback for GeoJSON loader
|
// style callback for GeoJSON loader
|
||||||
var style = editor._get_mapitem_type_style(feature.properties.type);
|
var style = editor._get_mapitem_type_style(feature.properties.type);
|
||||||
|
if (editor._section_control.current_section_id === editor._subsection_control.current_section_id) {
|
||||||
if (editor._subsection_control.section_ids.indexOf(feature.properties.section) >= 0 && editor._section_control.current_section_id !== feature.properties.section) {
|
if (editor._subsection_control.section_ids.indexOf(feature.properties.section) >= 0 && editor._section_control.current_section_id !== feature.properties.section) {
|
||||||
style.stroke = true;
|
style.stroke = true;
|
||||||
style.weight = 1;
|
style.weight = 1;
|
||||||
style.color = '#ffffff';
|
style.color = '#ffffff';
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
if (editor._subsection_control.current_section_id !== feature.properties.section) {
|
||||||
|
style.fillOpacity = 0.5;
|
||||||
|
}
|
||||||
|
}
|
||||||
if (feature.geometry.type === 'LineString') {
|
if (feature.geometry.type === 'LineString') {
|
||||||
style = editor._line_draw_geometry_style(style);
|
style = editor._line_draw_geometry_style(style);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue