Don't use goog.isBoolean()

This commit is contained in:
Marc Jansen
2016-02-16 23:32:07 +01:00
parent 6276bbce38
commit 068960e4b2
3 changed files with 4 additions and 4 deletions

View File

@@ -116,7 +116,7 @@ ol.DeviceOrientation.prototype.orientationChange_ = function(originalEvent) {
var alpha = ol.math.toRadians(event.alpha);
this.set(ol.DeviceOrientationProperty.ALPHA, alpha);
// event.absolute is undefined in iOS.
if (goog.isBoolean(event.absolute) && event.absolute) {
if (typeof event.absolute === 'boolean' && event.absolute) {
this.set(ol.DeviceOrientationProperty.HEADING, alpha);
} else if (goog.isNumber(event.webkitCompassHeading) &&
event.webkitCompassAccuracy != -1) {

View File

@@ -1502,7 +1502,7 @@ ol.Map.createOptionsInternal = function(options) {
var logos = {};
if (options.logo === undefined ||
(goog.isBoolean(options.logo) && options.logo)) {
(typeof options.logo === 'boolean' && options.logo)) {
logos[ol.OL3_LOGO_URL] = ol.OL3_URL;
} else {
var logo = options.logo;

View File

@@ -392,10 +392,10 @@ ol.render.canvas.Replay.prototype.replay_ = function(
goog.asserts.assert(goog.isNumber(instruction[7]),
'8th instruction should be a number');
scale = /** @type {number} */ (instruction[7]) * pixelRatio;
goog.asserts.assert(goog.isBoolean(instruction[8]),
goog.asserts.assert(typeof instruction[8] === 'boolean',
'9th instruction should be a boolean');
fill = /** @type {boolean} */ (instruction[8]);
goog.asserts.assert(goog.isBoolean(instruction[9]),
goog.asserts.assert(typeof instruction[9] === 'boolean',
'10th instruction should be a boolean');
stroke = /** @type {boolean} */ (instruction[9]);
for (; d < dd; d += 2) {