Use union instead of enum for geometry type

This commit is contained in:
Tim Schaub
2021-09-04 17:39:54 -06:00
committed by Andreas Hocevar
parent 04ad0e0c5a
commit 9a6f8493fb
35 changed files with 296 additions and 378 deletions
+2 -6
View File
@@ -4,7 +4,6 @@
import Collection from '../Collection.js';
import CollectionEventType from '../CollectionEventType.js';
import Event from '../events/Event.js';
import GeometryType from '../geom/GeometryType.js';
import Interaction from './Interaction.js';
import VectorLayer from '../layer/Vector.js';
import {TRUE} from '../functions.js';
@@ -569,11 +568,8 @@ class Select extends Interaction {
*/
function getDefaultStyleFunction() {
const styles = createEditingStyle();
extend(styles[GeometryType.POLYGON], styles[GeometryType.LINE_STRING]);
extend(
styles[GeometryType.GEOMETRY_COLLECTION],
styles[GeometryType.LINE_STRING]
);
extend(styles['Polygon'], styles['LineString']);
extend(styles['GeometryCollection'], styles['LineString']);
return function (feature) {
if (!feature.getGeometry()) {