Remove use of goog.isString()
This commit is contained in:
@@ -74,7 +74,7 @@ ol.control.Attribution = function(opt_options) {
|
||||
* @private
|
||||
* @type {Node}
|
||||
*/
|
||||
this.collapseLabel_ = goog.isString(collapseLabel) ?
|
||||
this.collapseLabel_ = typeof collapseLabel === 'string' ?
|
||||
goog.dom.createDom('SPAN', {}, collapseLabel) :
|
||||
collapseLabel;
|
||||
|
||||
@@ -84,7 +84,7 @@ ol.control.Attribution = function(opt_options) {
|
||||
* @private
|
||||
* @type {Node}
|
||||
*/
|
||||
this.label_ = goog.isString(label) ?
|
||||
this.label_ = typeof label === 'string' ?
|
||||
goog.dom.createDom('SPAN', {}, label) :
|
||||
label;
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ ol.control.FullScreen = function(opt_options) {
|
||||
* @private
|
||||
* @type {Node}
|
||||
*/
|
||||
this.labelNode_ = goog.isString(label) ?
|
||||
this.labelNode_ = typeof label === 'string' ?
|
||||
document.createTextNode(label) : label;
|
||||
|
||||
var labelActive = options.labelActive ? options.labelActive : '\u00d7';
|
||||
@@ -54,7 +54,7 @@ ol.control.FullScreen = function(opt_options) {
|
||||
* @private
|
||||
* @type {Node}
|
||||
*/
|
||||
this.labelActiveNode_ = goog.isString(labelActive) ?
|
||||
this.labelActiveNode_ = typeof labelActive === 'string' ?
|
||||
document.createTextNode(labelActive) : labelActive;
|
||||
|
||||
var tipLabel = options.tipLabel ? options.tipLabel : 'Toggle full-screen';
|
||||
|
||||
@@ -62,7 +62,7 @@ ol.control.OverviewMap = function(opt_options) {
|
||||
* @private
|
||||
* @type {Node}
|
||||
*/
|
||||
this.collapseLabel_ = goog.isString(collapseLabel) ?
|
||||
this.collapseLabel_ = typeof collapseLabel === 'string' ?
|
||||
goog.dom.createDom('SPAN', {}, collapseLabel) :
|
||||
collapseLabel;
|
||||
|
||||
@@ -72,7 +72,7 @@ ol.control.OverviewMap = function(opt_options) {
|
||||
* @private
|
||||
* @type {Node}
|
||||
*/
|
||||
this.label_ = goog.isString(label) ?
|
||||
this.label_ = typeof label === 'string' ?
|
||||
goog.dom.createDom('SPAN', {}, label) :
|
||||
label;
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ ol.control.Rotate = function(opt_options) {
|
||||
*/
|
||||
this.label_ = null;
|
||||
|
||||
if (goog.isString(label)) {
|
||||
if (typeof label === 'string') {
|
||||
this.label_ = goog.dom.createDom('SPAN',
|
||||
'ol-compass', label);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user