Skip to content

Commit 615528f

Browse files
committed
points cannot be in direct select
1 parent 9a6156d commit 615528f

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/feature_types/line_string.js

-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ LineString.prototype.addCoordinate = function(path, lng, lat) {
1414
this.selectedCoords = {};
1515
var id = parseInt(path, 10);
1616
this.coordinates.splice(id, 0, [lng, lat]);
17-
this.ctx.store.render();
1817
};
1918

2019
LineString.prototype.getCoordinate = function(path) {

src/modes/simple_select.js

+5-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,11 @@ module.exports = function(ctx, startingSelectedFeatureIds) {
1414
var numFeatures = null;
1515

1616
var readyForDirectSelect = function(e) {
17-
var about = e.featureTarget.properties;
18-
return isFeature(e) && about.type !== 'Point' && selectedFeaturesById[about.id] !== undefined;
17+
if (isFeature(e)) {
18+
var about = e.featureTarget.properties;
19+
return selectedFeaturesById[about.id] !== undefined && selectedFeaturesById[about.id].type !== 'Point';
20+
}
21+
return false;
1922
};
2023

2124
var buildFeatureCoords = function() {

0 commit comments

Comments
 (0)