Use ol.inherits instead of goog.inherits
This commit is contained in:
@@ -105,7 +105,7 @@ ol.control.Attribution = function(opt_options) {
|
||||
|
||||
var render = options.render ? options.render : ol.control.Attribution.render;
|
||||
|
||||
goog.base(this, {
|
||||
ol.control.Control.call(this, {
|
||||
element: element,
|
||||
render: render,
|
||||
target: options.target
|
||||
@@ -136,7 +136,7 @@ ol.control.Attribution = function(opt_options) {
|
||||
this.logoElements_ = {};
|
||||
|
||||
};
|
||||
goog.inherits(ol.control.Attribution, ol.control.Control);
|
||||
ol.inherits(ol.control.Attribution, ol.control.Control);
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -38,7 +38,7 @@ goog.require('ol.Object');
|
||||
*/
|
||||
ol.control.Control = function(options) {
|
||||
|
||||
goog.base(this);
|
||||
ol.Object.call(this);
|
||||
|
||||
/**
|
||||
* @protected
|
||||
@@ -74,7 +74,7 @@ ol.control.Control = function(options) {
|
||||
}
|
||||
|
||||
};
|
||||
goog.inherits(ol.control.Control, ol.Object);
|
||||
ol.inherits(ol.control.Control, ol.Object);
|
||||
|
||||
|
||||
/**
|
||||
@@ -82,7 +82,7 @@ goog.inherits(ol.control.Control, ol.Object);
|
||||
*/
|
||||
ol.control.Control.prototype.disposeInternal = function() {
|
||||
goog.dom.removeNode(this.element);
|
||||
goog.base(this, 'disposeInternal');
|
||||
ol.Object.prototype.disposeInternal.call(this);
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -72,7 +72,7 @@ ol.control.FullScreen = function(opt_options) {
|
||||
(!goog.dom.fullscreen.isSupported() ? ol.css.CLASS_UNSUPPORTED : '');
|
||||
var element = goog.dom.createDom('DIV', cssClasses, button);
|
||||
|
||||
goog.base(this, {
|
||||
ol.control.Control.call(this, {
|
||||
element: element,
|
||||
target: options.target
|
||||
});
|
||||
@@ -90,7 +90,7 @@ ol.control.FullScreen = function(opt_options) {
|
||||
this.source_ = options.source;
|
||||
|
||||
};
|
||||
goog.inherits(ol.control.FullScreen, ol.control.Control);
|
||||
ol.inherits(ol.control.FullScreen, ol.control.Control);
|
||||
|
||||
|
||||
/**
|
||||
@@ -153,7 +153,7 @@ ol.control.FullScreen.prototype.handleFullScreenChange_ = function() {
|
||||
* @api stable
|
||||
*/
|
||||
ol.control.FullScreen.prototype.setMap = function(map) {
|
||||
goog.base(this, 'setMap', map);
|
||||
ol.control.Control.prototype.setMap.call(this, map);
|
||||
if (map) {
|
||||
this.listenerKeys.push(
|
||||
ol.events.listen(ol.global.document, goog.dom.fullscreen.EventType.CHANGE,
|
||||
|
||||
@@ -42,7 +42,7 @@ ol.control.MousePosition = function(opt_options) {
|
||||
var render = options.render ?
|
||||
options.render : ol.control.MousePosition.render;
|
||||
|
||||
goog.base(this, {
|
||||
ol.control.Control.call(this, {
|
||||
element: element,
|
||||
render: render,
|
||||
target: options.target
|
||||
@@ -90,7 +90,7 @@ ol.control.MousePosition = function(opt_options) {
|
||||
this.lastMouseMovePixel_ = null;
|
||||
|
||||
};
|
||||
goog.inherits(ol.control.MousePosition, ol.control.Control);
|
||||
ol.inherits(ol.control.MousePosition, ol.control.Control);
|
||||
|
||||
|
||||
/**
|
||||
@@ -174,7 +174,7 @@ ol.control.MousePosition.prototype.handleMouseOut = function(event) {
|
||||
* @api stable
|
||||
*/
|
||||
ol.control.MousePosition.prototype.setMap = function(map) {
|
||||
goog.base(this, 'setMap', map);
|
||||
ol.control.Control.prototype.setMap.call(this, map);
|
||||
if (map) {
|
||||
var viewport = map.getViewport();
|
||||
this.listenerKeys.push(
|
||||
|
||||
@@ -132,13 +132,13 @@ ol.control.OverviewMap = function(opt_options) {
|
||||
|
||||
var render = options.render ? options.render : ol.control.OverviewMap.render;
|
||||
|
||||
goog.base(this, {
|
||||
ol.control.Control.call(this, {
|
||||
element: element,
|
||||
render: render,
|
||||
target: options.target
|
||||
});
|
||||
};
|
||||
goog.inherits(ol.control.OverviewMap, ol.control.Control);
|
||||
ol.inherits(ol.control.OverviewMap, ol.control.Control);
|
||||
|
||||
|
||||
/**
|
||||
@@ -156,7 +156,7 @@ ol.control.OverviewMap.prototype.setMap = function(map) {
|
||||
this.unbindView_(oldView);
|
||||
}
|
||||
}
|
||||
goog.base(this, 'setMap', map);
|
||||
ol.control.Control.prototype.setMap.call(this, map);
|
||||
|
||||
if (map) {
|
||||
this.listenerKeys.push(ol.events.listen(
|
||||
|
||||
@@ -62,7 +62,7 @@ ol.control.Rotate = function(opt_options) {
|
||||
|
||||
this.callResetNorth_ = options.resetNorth ? options.resetNorth : undefined;
|
||||
|
||||
goog.base(this, {
|
||||
ol.control.Control.call(this, {
|
||||
element: element,
|
||||
render: render,
|
||||
target: options.target
|
||||
@@ -91,7 +91,7 @@ ol.control.Rotate = function(opt_options) {
|
||||
}
|
||||
|
||||
};
|
||||
goog.inherits(ol.control.Rotate, ol.control.Control);
|
||||
ol.inherits(ol.control.Rotate, ol.control.Control);
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -102,7 +102,7 @@ ol.control.ScaleLine = function(opt_options) {
|
||||
|
||||
var render = options.render ? options.render : ol.control.ScaleLine.render;
|
||||
|
||||
goog.base(this, {
|
||||
ol.control.Control.call(this, {
|
||||
element: this.element_,
|
||||
render: render,
|
||||
target: options.target
|
||||
@@ -116,7 +116,7 @@ ol.control.ScaleLine = function(opt_options) {
|
||||
ol.control.ScaleLineUnits.METRIC);
|
||||
|
||||
};
|
||||
goog.inherits(ol.control.ScaleLine, ol.control.Control);
|
||||
ol.inherits(ol.control.ScaleLine, ol.control.Control);
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -58,7 +58,7 @@ ol.control.Zoom = function(opt_options) {
|
||||
ol.css.CLASS_CONTROL;
|
||||
var element = goog.dom.createDom('DIV', cssClasses, inElement, outElement);
|
||||
|
||||
goog.base(this, {
|
||||
ol.control.Control.call(this, {
|
||||
element: element,
|
||||
target: options.target
|
||||
});
|
||||
@@ -70,7 +70,7 @@ ol.control.Zoom = function(opt_options) {
|
||||
this.duration_ = options.duration !== undefined ? options.duration : 250;
|
||||
|
||||
};
|
||||
goog.inherits(ol.control.Zoom, ol.control.Control);
|
||||
ol.inherits(ol.control.Zoom, ol.control.Control);
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -137,12 +137,12 @@ ol.control.ZoomSlider = function(opt_options) {
|
||||
|
||||
var render = options.render ? options.render : ol.control.ZoomSlider.render;
|
||||
|
||||
goog.base(this, {
|
||||
ol.control.Control.call(this, {
|
||||
element: containerElement,
|
||||
render: render
|
||||
});
|
||||
};
|
||||
goog.inherits(ol.control.ZoomSlider, ol.control.Control);
|
||||
ol.inherits(ol.control.ZoomSlider, ol.control.Control);
|
||||
|
||||
|
||||
/**
|
||||
@@ -150,7 +150,7 @@ goog.inherits(ol.control.ZoomSlider, ol.control.Control);
|
||||
*/
|
||||
ol.control.ZoomSlider.prototype.disposeInternal = function() {
|
||||
this.dragger_.dispose();
|
||||
goog.base(this, 'disposeInternal');
|
||||
ol.control.Control.prototype.disposeInternal.call(this);
|
||||
};
|
||||
|
||||
|
||||
@@ -169,7 +169,7 @@ ol.control.ZoomSlider.direction = {
|
||||
* @inheritDoc
|
||||
*/
|
||||
ol.control.ZoomSlider.prototype.setMap = function(map) {
|
||||
goog.base(this, 'setMap', map);
|
||||
ol.control.Control.prototype.setMap.call(this, map);
|
||||
if (map) {
|
||||
map.render();
|
||||
}
|
||||
|
||||
@@ -45,12 +45,12 @@ ol.control.ZoomToExtent = function(opt_options) {
|
||||
ol.css.CLASS_CONTROL;
|
||||
var element = goog.dom.createDom('DIV', cssClasses, button);
|
||||
|
||||
goog.base(this, {
|
||||
ol.control.Control.call(this, {
|
||||
element: element,
|
||||
target: options.target
|
||||
});
|
||||
};
|
||||
goog.inherits(ol.control.ZoomToExtent, ol.control.Control);
|
||||
ol.inherits(ol.control.ZoomToExtent, ol.control.Control);
|
||||
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user