Named export for ol/asserts

This commit is contained in:
Frederic Junod
2017-12-17 18:10:59 +01:00
parent 7202573f82
commit 9349ba5403
33 changed files with 89 additions and 92 deletions
+2 -2
View File
@@ -2,7 +2,7 @@
* @module ol/events/condition
*/
import MapBrowserEventType from '../MapBrowserEventType.js';
import _ol_asserts_ from '../asserts.js';
import {assert} from '../asserts.js';
import {TRUE, FALSE} from '../functions.js';
import _ol_has_ from '../has.js';
var _ol_events_condition_ = {};
@@ -206,7 +206,7 @@ _ol_events_condition_.targetNotEditable = function(mapBrowserEvent) {
* @api
*/
_ol_events_condition_.mouseOnly = function(mapBrowserEvent) {
_ol_asserts_.assert(mapBrowserEvent.pointerEvent, 56); // mapBrowserEvent must originate from a pointer event
assert(mapBrowserEvent.pointerEvent, 56); // mapBrowserEvent must originate from a pointer event
// see http://www.w3.org/TR/pointerevents/#widl-PointerEvent-pointerType
return /** @type {ol.MapBrowserEvent} */ (mapBrowserEvent).pointerEvent.pointerType == 'mouse';
};