Skip to content

Commit

Permalink
Don't collect vertices for single multi point.
Browse files Browse the repository at this point in the history
(So is not necessary and the code is simplified)
  • Loading branch information
jorix committed Aug 21, 2013
1 parent d9d16cf commit 175c2bf
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions lib/Ragbag/Control/ModifyFeature-tools.js
Original file line number Diff line number Diff line change
Expand Up @@ -817,14 +817,9 @@ OpenLayers.Control.ModifyFeature = OpenLayers.Class(OpenLayers.Control, {
vertex = feature;
} else if (feature === this.feature) {
if (this.isPoint) {
if (this.virtualVertices.length === 1) {
// if exists a virtual point then dit instead of the real point.
vertex = this.virtualVertices[0];
} else {
// drag a real point
vertex = feature;
isRealPoint = true;
}
// drag a real point
vertex = feature;
isRealPoint = true;
}
}
if (vertex) {
Expand Down Expand Up @@ -1342,7 +1337,7 @@ OpenLayers.Control.ModifyFeature = OpenLayers.Class(OpenLayers.Control, {

// Collect Vertices
// ----------------
if (onlyToolbar || !(mode & MODES.VERTICES)) {
if (onlyToolbar || isPoint || !(mode & MODES.VERTICES)) {
return;
}
var _vertices = [],
Expand Down

0 comments on commit 175c2bf

Please sign in to comment.