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 -3
View File
@@ -3,7 +3,6 @@
*/
import Event from '../events/Event.js';
import Feature from '../Feature.js';
import GeometryType from '../geom/GeometryType.js';
import MapBrowserEventType from '../MapBrowserEventType.js';
import Point from '../geom/Point.js';
import PointerInteraction from './Pointer.js';
@@ -478,7 +477,7 @@ class Extent extends PointerInteraction {
function getDefaultExtentStyleFunction() {
const style = createEditingStyle();
return function (feature, resolution) {
return style[GeometryType.POLYGON];
return style['Polygon'];
};
}
@@ -490,7 +489,7 @@ function getDefaultExtentStyleFunction() {
function getDefaultPointerStyleFunction() {
const style = createEditingStyle();
return function (feature, resolution) {
return style[GeometryType.POINT];
return style['Point'];
};
}