Additional uses of new source state type
This commit is contained in:
committed by
Andreas Hocevar
parent
57f147988d
commit
04ad0e0c5a
@@ -1,5 +1,4 @@
|
||||
import GeoTIFFSource from '../../../../../src/ol/source/GeoTIFF.js';
|
||||
import State from '../../../../../src/ol/source/State.js';
|
||||
import TileState from '../../../../../src/ol/TileState.js';
|
||||
|
||||
describe('ol/source/GeoTIFF', function () {
|
||||
@@ -115,9 +114,9 @@ describe('ol/source/GeoTIFF', function () {
|
||||
});
|
||||
|
||||
it('manages load states', function (done) {
|
||||
expect(source.getState()).to.be(State.LOADING);
|
||||
expect(source.getState()).to.be('loading');
|
||||
source.on('change', () => {
|
||||
expect(source.getState()).to.be(State.READY);
|
||||
expect(source.getState()).to.be('ready');
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
import Control from '../../../../src/ol/control/Control.js';
|
||||
import Layer from '../../../../src/ol/layer/Layer.js';
|
||||
import Map from '../../../../src/ol/Map.js';
|
||||
import SourceState from '../../../../src/ol/source/State.js';
|
||||
import View from '../../../../src/ol/View.js';
|
||||
|
||||
class Element extends Layer {
|
||||
@@ -22,7 +21,7 @@ class Element extends Layer {
|
||||
}
|
||||
|
||||
getSourceState() {
|
||||
return SourceState.READY;
|
||||
return 'ready';
|
||||
}
|
||||
|
||||
render() {
|
||||
|
||||
Reference in New Issue
Block a user