Fix drawstart and drawend events when drawing a point

The previous behavior was to fire a `drawstart` on the first `mousemove`.
This commit is contained in:
Frederic Junod
2015-07-28 14:38:16 +02:00
parent 64225776d4
commit 2143eebd30
2 changed files with 9 additions and 10 deletions

View File

@@ -168,10 +168,10 @@ describe('ol.interaction.Draw', function() {
simulateEvent('pointermove', 10, 20);
simulateEvent('pointerdown', 10, 20);
simulateEvent('pointerup', 10, 20);
simulateEvent('pointermove', 20, 20);
expect(ds).to.be.called();
expect(ds.callCount).to.be(2);
expect(de).to.be.called();
simulateEvent('pointermove', 20, 20);
expect(ds.callCount).to.be(1);
expect(de.callCount).to.be(1);
});