Add assert messages for all assertions up until ol.renderer.vector.

This commit is contained in:
Bart van den Eijnden
2015-03-30 16:41:32 +02:00
parent fb9ba22c30
commit 47ce127a10
74 changed files with 1173 additions and 682 deletions
+4 -2
View File
@@ -145,7 +145,8 @@ ol.events.condition.shiftKeyOnly = function(mapBrowserEvent) {
*/
ol.events.condition.targetNotEditable = function(mapBrowserEvent) {
var target = mapBrowserEvent.browserEvent.target;
goog.asserts.assertInstanceof(target, Element);
goog.asserts.assertInstanceof(target, Element,
'target should be an Element');
var tagName = target.tagName;
return (
tagName !== goog.dom.TagName.INPUT &&
@@ -160,7 +161,8 @@ ol.events.condition.targetNotEditable = function(mapBrowserEvent) {
* @api stable
*/
ol.events.condition.mouseOnly = function(mapBrowserEvent) {
goog.asserts.assertInstanceof(mapBrowserEvent, ol.MapBrowserPointerEvent);
goog.asserts.assertInstanceof(mapBrowserEvent, ol.MapBrowserPointerEvent,
'mapBrowserEvent should be an instance of ol.MapBrowserPointerEvent');
/* pointerId must be 1 for mouse devices,
* see: http://www.w3.org/Submission/pointer-events/#pointerevent-interface
*/