Recover from bad merge conflict resolution in #4036
This commit is contained in:
@@ -265,8 +265,8 @@ ol.interaction.Modify.prototype.addFeature_ = function(feature) {
|
|||||||
ol.interaction.Modify.prototype.willModifyFeatures_ = function(evt) {
|
ol.interaction.Modify.prototype.willModifyFeatures_ = function(evt) {
|
||||||
if (!this.modified_) {
|
if (!this.modified_) {
|
||||||
this.modified_ = true;
|
this.modified_ = true;
|
||||||
this.dispatchEvent(new ol.ModifyEvent(ol.ModifyEventType.MODIFYSTART,
|
this.dispatchEvent(new ol.interaction.ModifyEvent(
|
||||||
this.features_, evt));
|
ol.ModifyEventType.MODIFYSTART, this.features_, evt));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -678,8 +678,8 @@ ol.interaction.Modify.handleUpEvent_ = function(evt) {
|
|||||||
segmentData);
|
segmentData);
|
||||||
}
|
}
|
||||||
if (this.modified_) {
|
if (this.modified_) {
|
||||||
this.dispatchEvent(new ol.ModifyEvent(ol.ModifyEventType.MODIFYEND,
|
this.dispatchEvent(new ol.interaction.ModifyEvent(
|
||||||
this.features_, evt));
|
ol.ModifyEventType.MODIFYEND, this.features_, evt));
|
||||||
this.modified_ = false;
|
this.modified_ = false;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
@@ -713,8 +713,8 @@ ol.interaction.Modify.handleEvent = function(mapBrowserEvent) {
|
|||||||
'geometry should be an ol.geom.Point');
|
'geometry should be an ol.geom.Point');
|
||||||
this.willModifyFeatures_(mapBrowserEvent);
|
this.willModifyFeatures_(mapBrowserEvent);
|
||||||
handled = this.removeVertex_();
|
handled = this.removeVertex_();
|
||||||
this.dispatchEvent(new ol.ModifyEvent(ol.ModifyEventType.MODIFYEND,
|
this.dispatchEvent(new ol.interaction.ModifyEvent(
|
||||||
this.features_, mapBrowserEvent));
|
ol.ModifyEventType.MODIFYEND, this.features_, mapBrowserEvent));
|
||||||
this.modified_ = false;
|
this.modified_ = false;
|
||||||
} else {
|
} else {
|
||||||
handled = true;
|
handled = true;
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ describe('ol.interaction.Modify', function() {
|
|||||||
* modifications. Helper function to
|
* modifications. Helper function to
|
||||||
* @param {ol.Feature} feature Modified feature.
|
* @param {ol.Feature} feature Modified feature.
|
||||||
* @param {ol.interaction.Modify} interaction
|
* @param {ol.interaction.Modify} interaction
|
||||||
* @return {Array<ol.ModifyEvent|string>} events
|
* @return {Array<ol.interaction.ModifyEvent|string>} events
|
||||||
*/
|
*/
|
||||||
function trackEvents(feature, interaction) {
|
function trackEvents(feature, interaction) {
|
||||||
var events = [];
|
var events = [];
|
||||||
@@ -103,7 +103,7 @@ describe('ol.interaction.Modify', function() {
|
|||||||
* Validates the event array to verify proper event sequence. Checks
|
* Validates the event array to verify proper event sequence. Checks
|
||||||
* that first and last event are correct ModifyEvents and that feature
|
* that first and last event are correct ModifyEvents and that feature
|
||||||
* modifications event are in between.
|
* modifications event are in between.
|
||||||
* @param {Array<ol.ModifyEvent|string>} event
|
* @param {Array<ol.interaction.ModifyEvent|string>} event
|
||||||
* @param {Array<ol.Feature>} features
|
* @param {Array<ol.Feature>} features
|
||||||
*/
|
*/
|
||||||
function validateEvents(events, features) {
|
function validateEvents(events, features) {
|
||||||
@@ -112,11 +112,11 @@ describe('ol.interaction.Modify', function() {
|
|||||||
var endevent = events[events.length - 1];
|
var endevent = events[events.length - 1];
|
||||||
|
|
||||||
// first event should be modifystary
|
// first event should be modifystary
|
||||||
expect(startevent).to.be.an(ol.ModifyEvent);
|
expect(startevent).to.be.an(ol.interaction.ModifyEvent);
|
||||||
expect(startevent.type).to.eql('modifystart');
|
expect(startevent.type).to.eql('modifystart');
|
||||||
|
|
||||||
// last event should be modifyend
|
// last event should be modifyend
|
||||||
expect(endevent).to.be.an(ol.ModifyEvent);
|
expect(endevent).to.be.an(ol.interaction.ModifyEvent);
|
||||||
expect(endevent.type).to.eql('modifyend');
|
expect(endevent.type).to.eql('modifyend');
|
||||||
|
|
||||||
// make sure we get change events to events array
|
// make sure we get change events to events array
|
||||||
@@ -387,6 +387,7 @@ goog.require('ol.events.condition');
|
|||||||
goog.require('ol.geom.Point');
|
goog.require('ol.geom.Point');
|
||||||
goog.require('ol.geom.Polygon');
|
goog.require('ol.geom.Polygon');
|
||||||
goog.require('ol.interaction.Modify');
|
goog.require('ol.interaction.Modify');
|
||||||
|
goog.require('ol.interaction.ModifyEvent');
|
||||||
goog.require('ol.layer.Vector');
|
goog.require('ol.layer.Vector');
|
||||||
goog.require('ol.pointer.PointerEvent');
|
goog.require('ol.pointer.PointerEvent');
|
||||||
goog.require('ol.source.Vector');
|
goog.require('ol.source.Vector');
|
||||||
|
|||||||
Reference in New Issue
Block a user