Replace goog.getUid with ol.getUid
This commit is contained in:
@@ -568,7 +568,7 @@ ol.interaction.Modify.handleDownEvent_ = function(evt) {
|
||||
for (var i = 0, ii = segmentDataMatches.length; i < ii; ++i) {
|
||||
var segmentDataMatch = segmentDataMatches[i];
|
||||
var segment = segmentDataMatch.segment;
|
||||
var uid = goog.getUid(segmentDataMatch.feature);
|
||||
var uid = ol.getUid(segmentDataMatch.feature);
|
||||
var depth = segmentDataMatch.depth;
|
||||
if (depth) {
|
||||
uid += '-' + depth.join('-'); // separate feature components
|
||||
@@ -595,7 +595,7 @@ ol.interaction.Modify.handleDownEvent_ = function(evt) {
|
||||
|
||||
this.dragSegments_.push([segmentDataMatch, 1]);
|
||||
componentSegments[uid][1] = segmentDataMatch;
|
||||
} else if (goog.getUid(segment) in this.vertexSegments_ &&
|
||||
} else if (ol.getUid(segment) in this.vertexSegments_ &&
|
||||
(!componentSegments[uid][0] && !componentSegments[uid][1])) {
|
||||
insertVertices.push([segmentDataMatch, vertex]);
|
||||
}
|
||||
@@ -783,7 +783,7 @@ ol.interaction.Modify.prototype.handlePointerAtPixel_ = function(pixel, map) {
|
||||
}
|
||||
this.createOrUpdateVertexFeature_(vertex);
|
||||
var vertexSegments = {};
|
||||
vertexSegments[goog.getUid(closestSegment)] = true;
|
||||
vertexSegments[ol.getUid(closestSegment)] = true;
|
||||
var segment;
|
||||
for (var i = 1, ii = nodes.length; i < ii; ++i) {
|
||||
segment = nodes[i].segment;
|
||||
@@ -791,7 +791,7 @@ ol.interaction.Modify.prototype.handlePointerAtPixel_ = function(pixel, map) {
|
||||
ol.coordinate.equals(closestSegment[1], segment[1]) ||
|
||||
(ol.coordinate.equals(closestSegment[0], segment[1]) &&
|
||||
ol.coordinate.equals(closestSegment[1], segment[0])))) {
|
||||
vertexSegments[goog.getUid(segment)] = true;
|
||||
vertexSegments[ol.getUid(segment)] = true;
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
@@ -915,7 +915,7 @@ ol.interaction.Modify.prototype.removeVertex_ = function() {
|
||||
for (i = dragSegments.length - 1; i >= 0; --i) {
|
||||
dragSegment = dragSegments[i];
|
||||
segmentData = dragSegment[0];
|
||||
uid = goog.getUid(segmentData.feature);
|
||||
uid = ol.getUid(segmentData.feature);
|
||||
if (segmentData.depth) {
|
||||
// separate feature components
|
||||
uid += '-' + segmentData.depth.join('-');
|
||||
|
||||
@@ -211,7 +211,7 @@ ol.inherits(ol.interaction.Select, ol.interaction.Interaction);
|
||||
* @private
|
||||
*/
|
||||
ol.interaction.Select.prototype.addFeatureLayerAssociation_ = function(feature, layer) {
|
||||
var key = goog.getUid(feature);
|
||||
var key = ol.getUid(feature);
|
||||
this.featureLayerAssociation_[key] = layer;
|
||||
};
|
||||
|
||||
@@ -238,7 +238,7 @@ ol.interaction.Select.prototype.getFeatures = function() {
|
||||
ol.interaction.Select.prototype.getLayer = function(feature) {
|
||||
goog.asserts.assertInstanceof(feature, ol.Feature,
|
||||
'feature should be an ol.Feature');
|
||||
var key = goog.getUid(feature);
|
||||
var key = ol.getUid(feature);
|
||||
return /** @type {ol.layer.Vector} */ (this.featureLayerAssociation_[key]);
|
||||
};
|
||||
|
||||
@@ -400,6 +400,6 @@ ol.interaction.Select.prototype.removeFeature_ = function(evt) {
|
||||
* @private
|
||||
*/
|
||||
ol.interaction.Select.prototype.removeFeatureLayerAssociation_ = function(feature) {
|
||||
var key = goog.getUid(feature);
|
||||
var key = ol.getUid(feature);
|
||||
delete this.featureLayerAssociation_[key];
|
||||
};
|
||||
|
||||
@@ -171,7 +171,7 @@ ol.inherits(ol.interaction.Snap, ol.interaction.Pointer);
|
||||
*/
|
||||
ol.interaction.Snap.prototype.addFeature = function(feature, opt_listen) {
|
||||
var listen = opt_listen !== undefined ? opt_listen : true;
|
||||
var feature_uid = goog.getUid(feature);
|
||||
var feature_uid = ol.getUid(feature);
|
||||
var geometry = feature.getGeometry();
|
||||
if (geometry) {
|
||||
var segmentWriter = this.SEGMENT_WRITERS_[geometry.getType()];
|
||||
@@ -286,7 +286,7 @@ ol.interaction.Snap.prototype.handleGeometryChange_ = function(evt) {
|
||||
*/
|
||||
ol.interaction.Snap.prototype.handleGeometryModify_ = function(feature, evt) {
|
||||
if (this.handlingDownUpSequence) {
|
||||
var uid = goog.getUid(feature);
|
||||
var uid = ol.getUid(feature);
|
||||
if (!(uid in this.pendingFeatures_)) {
|
||||
this.pendingFeatures_[uid] = feature;
|
||||
}
|
||||
@@ -305,7 +305,7 @@ ol.interaction.Snap.prototype.handleGeometryModify_ = function(feature, evt) {
|
||||
*/
|
||||
ol.interaction.Snap.prototype.removeFeature = function(feature, opt_unlisten) {
|
||||
var unlisten = opt_unlisten !== undefined ? opt_unlisten : true;
|
||||
var feature_uid = goog.getUid(feature);
|
||||
var feature_uid = ol.getUid(feature);
|
||||
var extent = this.indexedFeaturesExtents_[feature_uid];
|
||||
if (extent) {
|
||||
var rBush = this.rBush_;
|
||||
|
||||
Reference in New Issue
Block a user