Enforces spacing around commas
This commit is contained in:
@@ -74,17 +74,17 @@ describe('ol.interaction.Extent', function() {
|
||||
}
|
||||
describe('snap to vertex', function() {
|
||||
it('snap to vertex works', function() {
|
||||
interaction.setExtent([-50,-50,50,50]);
|
||||
interaction.setExtent([-50, -50, 50, 50]);
|
||||
|
||||
expect(interaction.snapToVertex_([230,40], map)).to.eql([50,50]);
|
||||
expect(interaction.snapToVertex_([231,41], map)).to.eql([50,50]);
|
||||
expect(interaction.snapToVertex_([230, 40], map)).to.eql([50, 50]);
|
||||
expect(interaction.snapToVertex_([231, 41], map)).to.eql([50, 50]);
|
||||
});
|
||||
it('snap to edge works', function() {
|
||||
interaction.setExtent([-50,-50,50,50]);
|
||||
interaction.setExtent([-50, -50, 50, 50]);
|
||||
|
||||
expect(interaction.snapToVertex_([230,90], map)).to.eql([50,0]);
|
||||
expect(interaction.snapToVertex_([230,89], map)).to.eql([50,1]);
|
||||
expect(interaction.snapToVertex_([231,90], map)).to.eql([50,0]);
|
||||
expect(interaction.snapToVertex_([230, 90], map)).to.eql([50, 0]);
|
||||
expect(interaction.snapToVertex_([230, 89], map)).to.eql([50, 1]);
|
||||
expect(interaction.snapToVertex_([231, 90], map)).to.eql([50, 0]);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -95,11 +95,11 @@ describe('ol.interaction.Extent', function() {
|
||||
simulateEvent('pointerdrag', 50, 50, false, 0);
|
||||
simulateEvent('pointerup', 50, 50, false, 0);
|
||||
|
||||
expect(interaction.getExtent()).to.eql([-50,-50,50,50]);
|
||||
expect(interaction.getExtent()).to.eql([-50, -50, 50, 50]);
|
||||
});
|
||||
|
||||
it('clicking off extent nulls extent', function() {
|
||||
interaction.setExtent([-50,-50,50,50]);
|
||||
interaction.setExtent([-50, -50, 50, 50]);
|
||||
|
||||
simulateEvent('pointerdown', -10, -10, false, 0);
|
||||
simulateEvent('pointerup', -10, -10, false, 0);
|
||||
@@ -108,32 +108,32 @@ describe('ol.interaction.Extent', function() {
|
||||
});
|
||||
|
||||
it('clicking on extent does not null extent', function() {
|
||||
interaction.setExtent([-50,-50,50,50]);
|
||||
interaction.setExtent([-50, -50, 50, 50]);
|
||||
|
||||
simulateEvent('pointerdown', 50, 50, false, 0);
|
||||
simulateEvent('pointerup', 50, 50, false, 0);
|
||||
|
||||
expect(interaction.getExtent()).to.eql([-50,-50,50,50]);
|
||||
expect(interaction.getExtent()).to.eql([-50, -50, 50, 50]);
|
||||
});
|
||||
|
||||
it('snap and drag vertex works', function() {
|
||||
interaction.setExtent([-50,-50,50,50]);
|
||||
interaction.setExtent([-50, -50, 50, 50]);
|
||||
|
||||
simulateEvent('pointerdown', 51, 49, false, 0);
|
||||
simulateEvent('pointerdrag', -70, -40, false, 0);
|
||||
simulateEvent('pointerup', -70, -40, false, 0);
|
||||
|
||||
expect(interaction.getExtent()).to.eql([-70,-50,-50,-40]);
|
||||
expect(interaction.getExtent()).to.eql([-70, -50, -50, -40]);
|
||||
});
|
||||
|
||||
it('snap and drag edge works', function() {
|
||||
interaction.setExtent([-50,-50,50,50]);
|
||||
interaction.setExtent([-50, -50, 50, 50]);
|
||||
|
||||
simulateEvent('pointerdown', 51, 5, false, 0);
|
||||
simulateEvent('pointerdrag', 20, -30, false, 0);
|
||||
simulateEvent('pointerup', 20, -30, false, 0);
|
||||
|
||||
expect(interaction.getExtent()).to.eql([-50,-50,20,50]);
|
||||
expect(interaction.getExtent()).to.eql([-50, -50, 20, 50]);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user