Verified isSingleTouch and isMultiTouch functions.
This commit is contained in:
@@ -122,7 +122,7 @@ describe("ol.Events", function() {
|
||||
events.destroy();
|
||||
});
|
||||
|
||||
it("has working on() and un() convenience methods", function() {
|
||||
it("has on() and un() convenience methods", function() {
|
||||
var scope = {}, events = new ol.event.Events("foo");
|
||||
|
||||
log = [];
|
||||
@@ -149,4 +149,16 @@ describe("ol.Events", function() {
|
||||
events.destroy();
|
||||
});
|
||||
|
||||
it("provides an isSingleTouch() function", function() {
|
||||
expect(ol.event.isSingleTouch({touches: [{}, {}]})).toBe(false);
|
||||
expect(ol.event.isSingleTouch({touches: [{}]})).toBe(true);
|
||||
expect(ol.event.isSingleTouch({})).toBe(false);
|
||||
});
|
||||
|
||||
it("provides an isMultiTouch() function", function() {
|
||||
expect(ol.event.isMultiTouch({touches: [{}, {}]})).toBe(true);
|
||||
expect(ol.event.isMultiTouch({touches: [{}]})).toBe(false);
|
||||
expect(ol.event.isMultiTouch({})).toBe(false);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user