Remove goog.isDef from device orientation, dom, extent, and feature

This commit is contained in:
Tim Schaub
2015-09-21 05:27:14 +09:00
parent 390153adc8
commit 5350e9ba37
4 changed files with 19 additions and 17 deletions
+6 -6
View File
@@ -19,10 +19,10 @@ goog.require('ol');
*/
ol.dom.createCanvasContext2D = function(opt_width, opt_height) {
var canvas = goog.dom.createElement(goog.dom.TagName.CANVAS);
if (goog.isDef(opt_width)) {
if (opt_width) {
canvas.width = opt_width;
}
if (goog.isDef(opt_height)) {
if (opt_height) {
canvas.height = opt_height;
}
return canvas.getContext('2d');
@@ -47,7 +47,7 @@ ol.dom.BrowserFeature = {
ol.dom.canUseCssTransform = (function() {
var canUseCssTransform;
return function() {
if (!goog.isDef(canUseCssTransform)) {
if (!ol.isDef(canUseCssTransform)) {
goog.asserts.assert(!goog.isNull(document.body),
'document.body should not be null');
if (!goog.global.getComputedStyle) {
@@ -90,7 +90,7 @@ ol.dom.canUseCssTransform = (function() {
ol.dom.canUseCssTransform3D = (function() {
var canUseCssTransform3D;
return function() {
if (!goog.isDef(canUseCssTransform3D)) {
if (!ol.isDef(canUseCssTransform3D)) {
goog.asserts.assert(!goog.isNull(document.body),
'document.body should not be null');
if (!goog.global.getComputedStyle) {
@@ -224,7 +224,7 @@ ol.dom.transformElement2D =
if (ol.dom.canUseCssTransform3D()) {
var value3D;
if (goog.isDef(opt_precision)) {
if (ol.isDef(opt_precision)) {
/** @type {Array.<string>} */
var strings3D = new Array(16);
for (i = 0; i < 16; ++i) {
@@ -246,7 +246,7 @@ ol.dom.transformElement2D =
goog.vec.Mat4.getElement(transform, 1, 3)
];
var value2D;
if (goog.isDef(opt_precision)) {
if (ol.isDef(opt_precision)) {
/** @type {Array.<string>} */
var strings2D = new Array(6);
for (i = 0; i < 6; ++i) {