Named exports from ol/events
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import _ol_Image_ from '../../../../src/ol/Image.js';
|
||||
import _ol_events_ from '../../../../src/ol/events.js';
|
||||
import {listen} from '../../../../src/ol/events.js';
|
||||
import {get as getProjection} from '../../../../src/ol/proj.js';
|
||||
import ReprojImage from '../../../../src/ol/reproj/Image.js';
|
||||
|
||||
@@ -22,7 +22,7 @@ describe('ol.reproj.Image', function() {
|
||||
it('changes state as expected', function(done) {
|
||||
const image = createImage(1);
|
||||
expect(image.getState()).to.be(0); // IDLE
|
||||
_ol_events_.listen(image, 'change', function() {
|
||||
listen(image, 'change', function() {
|
||||
if (image.getState() == 2) { // LOADED
|
||||
done();
|
||||
}
|
||||
@@ -32,7 +32,7 @@ describe('ol.reproj.Image', function() {
|
||||
|
||||
it('returns correct canvas size', function(done) {
|
||||
const image = createImage(1);
|
||||
_ol_events_.listen(image, 'change', function() {
|
||||
listen(image, 'change', function() {
|
||||
if (image.getState() == 2) { // LOADED
|
||||
const canvas = image.getImage();
|
||||
expect(canvas.width).to.be(36);
|
||||
@@ -45,7 +45,7 @@ describe('ol.reproj.Image', function() {
|
||||
|
||||
it('respects pixelRatio', function(done) {
|
||||
const image = createImage(2);
|
||||
_ol_events_.listen(image, 'change', function() {
|
||||
listen(image, 'change', function() {
|
||||
if (image.getState() == 2) { // LOADED
|
||||
const canvas = image.getImage();
|
||||
expect(canvas.width).to.be(72);
|
||||
|
||||
Reference in New Issue
Block a user