Move createDefaultEditingStyles() to ol.style
This commit is contained in:
@@ -11,7 +11,6 @@ goog.require('ol.Map');
|
||||
goog.require('ol.MapBrowserEvent');
|
||||
goog.require('ol.MapBrowserEvent.EventType');
|
||||
goog.require('ol.events.condition');
|
||||
goog.require('ol.feature');
|
||||
goog.require('ol.geom.GeometryType');
|
||||
goog.require('ol.geom.LineString');
|
||||
goog.require('ol.geom.MultiLineString');
|
||||
@@ -21,6 +20,7 @@ goog.require('ol.geom.Point');
|
||||
goog.require('ol.geom.Polygon');
|
||||
goog.require('ol.interaction.Pointer');
|
||||
goog.require('ol.source.Vector');
|
||||
goog.require('ol.style.Style');
|
||||
|
||||
|
||||
/**
|
||||
@@ -208,7 +208,7 @@ goog.inherits(ol.interaction.Draw, ol.interaction.Pointer);
|
||||
* @return {ol.style.StyleFunction} Styles.
|
||||
*/
|
||||
ol.interaction.Draw.getDefaultStyleFunction = function() {
|
||||
var styles = ol.feature.createDefaultEditingStyles();
|
||||
var styles = ol.style.createDefaultEditingStyles();
|
||||
return function(feature, resolution) {
|
||||
return styles[feature.getGeometry().getType()];
|
||||
};
|
||||
|
||||
@@ -13,7 +13,6 @@ goog.require('ol.ViewHint');
|
||||
goog.require('ol.coordinate');
|
||||
goog.require('ol.events.condition');
|
||||
goog.require('ol.extent');
|
||||
goog.require('ol.feature');
|
||||
goog.require('ol.geom.GeometryType');
|
||||
goog.require('ol.geom.LineString');
|
||||
goog.require('ol.geom.MultiLineString');
|
||||
@@ -23,6 +22,7 @@ goog.require('ol.geom.Point');
|
||||
goog.require('ol.geom.Polygon');
|
||||
goog.require('ol.interaction.Pointer');
|
||||
goog.require('ol.structs.RBush');
|
||||
goog.require('ol.style.Style');
|
||||
|
||||
|
||||
/**
|
||||
@@ -772,7 +772,7 @@ ol.interaction.Modify.prototype.updateSegmentIndices_ = function(
|
||||
* @return {ol.style.StyleFunction} Styles.
|
||||
*/
|
||||
ol.interaction.Modify.getDefaultStyleFunction = function() {
|
||||
var style = ol.feature.createDefaultEditingStyles();
|
||||
var style = ol.style.createDefaultEditingStyles();
|
||||
return function(feature, resolution) {
|
||||
return style[ol.geom.GeometryType.POINT];
|
||||
};
|
||||
|
||||
@@ -8,9 +8,9 @@ goog.require('ol.CollectionEventType');
|
||||
goog.require('ol.Feature');
|
||||
goog.require('ol.FeatureOverlay');
|
||||
goog.require('ol.events.condition');
|
||||
goog.require('ol.feature');
|
||||
goog.require('ol.geom.GeometryType');
|
||||
goog.require('ol.interaction.Interaction');
|
||||
goog.require('ol.style.Style');
|
||||
|
||||
|
||||
|
||||
@@ -207,7 +207,7 @@ ol.interaction.Select.prototype.setMap = function(map) {
|
||||
* @return {ol.style.StyleFunction} Styles.
|
||||
*/
|
||||
ol.interaction.Select.getDefaultStyleFunction = function() {
|
||||
var styles = ol.feature.createDefaultEditingStyles();
|
||||
var styles = ol.style.createDefaultEditingStyles();
|
||||
goog.array.extend(styles[ol.geom.GeometryType.POLYGON],
|
||||
styles[ol.geom.GeometryType.LINE_STRING]);
|
||||
goog.array.extend(styles[ol.geom.GeometryType.GEOMETRY_COLLECTION],
|
||||
|
||||
Reference in New Issue
Block a user