Replace IconOrigin enum with typedef
This commit is contained in:
@@ -4,7 +4,6 @@ import Fill from '../../../../../src/ol/style/Fill.js';
|
||||
import GeoJSON from '../../../../../src/ol/format/GeoJSON.js';
|
||||
import GeometryCollection from '../../../../../src/ol/geom/GeometryCollection.js';
|
||||
import Icon from '../../../../../src/ol/style/Icon.js';
|
||||
import IconOrigin from '../../../../../src/ol/style/IconOrigin.js';
|
||||
import ImageState from '../../../../../src/ol/ImageState.js';
|
||||
import KML, {
|
||||
getDefaultFillStyle,
|
||||
@@ -2429,7 +2428,7 @@ describe('ol.format.KML', function () {
|
||||
if (f.getId() == 1) {
|
||||
expect(imageStyle.anchor_[0]).to.be(0.5);
|
||||
expect(imageStyle.anchor_[1]).to.be(0.5);
|
||||
expect(imageStyle.anchorOrigin_).to.be(IconOrigin.BOTTOM_LEFT);
|
||||
expect(imageStyle.anchorOrigin_).to.be('bottom-left');
|
||||
expect(imageStyle.anchorXUnits_).to.be('fraction');
|
||||
expect(imageStyle.anchorYUnits_).to.be('fraction');
|
||||
} else {
|
||||
@@ -2438,16 +2437,16 @@ describe('ol.format.KML', function () {
|
||||
expect(imageStyle.anchorXUnits_).to.be('pixels');
|
||||
expect(imageStyle.anchorYUnits_).to.be('pixels');
|
||||
if (f.getId() == 2) {
|
||||
expect(imageStyle.anchorOrigin_).to.be(IconOrigin.BOTTOM_LEFT);
|
||||
expect(imageStyle.anchorOrigin_).to.be('bottom-left');
|
||||
}
|
||||
if (f.getId() == 3) {
|
||||
expect(imageStyle.anchorOrigin_).to.be(IconOrigin.BOTTOM_RIGHT);
|
||||
expect(imageStyle.anchorOrigin_).to.be('bottom-right');
|
||||
}
|
||||
if (f.getId() == 4) {
|
||||
expect(imageStyle.anchorOrigin_).to.be(IconOrigin.TOP_LEFT);
|
||||
expect(imageStyle.anchorOrigin_).to.be('top-left');
|
||||
}
|
||||
if (f.getId() == 5) {
|
||||
expect(imageStyle.anchorOrigin_).to.be(IconOrigin.TOP_RIGHT);
|
||||
expect(imageStyle.anchorOrigin_).to.be('top-right');
|
||||
}
|
||||
}
|
||||
expect(imageStyle.getRotation()).to.eql(0);
|
||||
|
||||
Reference in New Issue
Block a user