block doubleclick on graph items
This commit is contained in:
parent
04ffdce424
commit
2dc26aa1b4
1 changed files with 4 additions and 8 deletions
|
@ -366,6 +366,7 @@ editor = {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
editor._next_zoom = null;
|
editor._next_zoom = null;
|
||||||
|
editor.map.doubleClickZoom.enable();
|
||||||
|
|
||||||
editor._check_start_editing();
|
editor._check_start_editing();
|
||||||
});
|
});
|
||||||
|
@ -462,8 +463,7 @@ editor = {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}).getLayers()[0].addTo(editor._highlight_layer);
|
}).getLayers()[0].addTo(editor._highlight_layer);
|
||||||
space_layer.on('click', editor._click_graph_space)
|
space_layer.on('click', editor._click_graph_space);
|
||||||
.on('dblclick', editor._dblclick_graph_item);
|
|
||||||
}
|
}
|
||||||
} else if (feature.properties.type === 'graphnode' && editor._graph_editing !== null) {
|
} else if (feature.properties.type === 'graphnode' && editor._graph_editing !== null) {
|
||||||
var node_layer = L.geoJSON(layer.feature, {
|
var node_layer = L.geoJSON(layer.feature, {
|
||||||
|
@ -479,8 +479,7 @@ editor = {
|
||||||
}).getLayers()[0].addTo(editor._highlight_layer);
|
}).getLayers()[0].addTo(editor._highlight_layer);
|
||||||
node_layer.on('mouseover', editor._hover_graph_node)
|
node_layer.on('mouseover', editor._hover_graph_node)
|
||||||
.on('mouseout', editor._unhover_graph_node)
|
.on('mouseout', editor._unhover_graph_node)
|
||||||
.on('click', editor._click_graph_node)
|
.on('click', editor._click_graph_node);
|
||||||
.on('dblclick', editor._dblclick_graph_item);
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -578,15 +577,12 @@ editor = {
|
||||||
// click callback for a graph space
|
// click callback for a graph space
|
||||||
if (editor._loading_geometry) return;
|
if (editor._loading_geometry) return;
|
||||||
$('#id_clicked_position').val(JSON.stringify(L.marker(e.latlng).toGeoJSON().geometry)).closest('form').submit();
|
$('#id_clicked_position').val(JSON.stringify(L.marker(e.latlng).toGeoJSON().geometry)).closest('form').submit();
|
||||||
|
editor.map.doubleClickZoom.disable();
|
||||||
},
|
},
|
||||||
_click_graph_node: function(e) {
|
_click_graph_node: function(e) {
|
||||||
// click callback for a graph node
|
// click callback for a graph node
|
||||||
if (editor._loading_geometry) return;
|
if (editor._loading_geometry) return;
|
||||||
$('#id_clicked_node').val(e.target.feature.properties.id).closest('form').submit();
|
$('#id_clicked_node').val(e.target.feature.properties.id).closest('form').submit();
|
||||||
},
|
|
||||||
_dblclick_graph_item: function() {
|
|
||||||
// dblclick callback for a graph items… disable doubleclick zoom
|
|
||||||
if (editor._loading_geometry) return;
|
|
||||||
editor.map.doubleClickZoom.disable();
|
editor.map.doubleClickZoom.disable();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue