Merge pull request #7770 from marcjansen/more-renames

Rename _ol_render_Box_ to RenderBox
This commit is contained in:
Marc Jansen
2018-02-06 11:15:18 +01:00
committed by GitHub
4 changed files with 18 additions and 18 deletions

View File

@@ -6,7 +6,7 @@ import Event from '../events/Event.js';
import {inherits, nullFunction} from '../index.js';
import {always, mouseOnly, mouseActionButton} from '../events/condition.js';
import PointerInteraction from '../interaction/Pointer.js';
import _ol_render_Box_ from '../render/Box.js';
import RenderBox from '../render/Box.js';
/**
* @classdesc
@@ -39,7 +39,7 @@ const DragBox = function(opt_options) {
* @type {ol.render.Box}
* @private
*/
this.box_ = new _ol_render_Box_(options.className || 'ol-dragbox');
this.box_ = new RenderBox(options.className || 'ol-dragbox');
/**
* @type {number}

View File

@@ -12,7 +12,7 @@ import Polygon from '../geom/Polygon.js';
* @extends {ol.Disposable}
* @param {string} className CSS class name.
*/
const _ol_render_Box_ = function(className) {
const RenderBox = function(className) {
/**
* @type {ol.geom.Polygon}
@@ -48,13 +48,13 @@ const _ol_render_Box_ = function(className) {
};
inherits(_ol_render_Box_, Disposable);
inherits(RenderBox, Disposable);
/**
* @inheritDoc
*/
_ol_render_Box_.prototype.disposeInternal = function() {
RenderBox.prototype.disposeInternal = function() {
this.setMap(null);
};
@@ -62,7 +62,7 @@ _ol_render_Box_.prototype.disposeInternal = function() {
/**
* @private
*/
_ol_render_Box_.prototype.render_ = function() {
RenderBox.prototype.render_ = function() {
const startPixel = this.startPixel_;
const endPixel = this.endPixel_;
const px = 'px';
@@ -77,7 +77,7 @@ _ol_render_Box_.prototype.render_ = function() {
/**
* @param {ol.PluggableMap} map Map.
*/
_ol_render_Box_.prototype.setMap = function(map) {
RenderBox.prototype.setMap = function(map) {
if (this.map_) {
this.map_.getOverlayContainer().removeChild(this.element_);
const style = this.element_.style;
@@ -94,7 +94,7 @@ _ol_render_Box_.prototype.setMap = function(map) {
* @param {ol.Pixel} startPixel Start pixel.
* @param {ol.Pixel} endPixel End pixel.
*/
_ol_render_Box_.prototype.setPixels = function(startPixel, endPixel) {
RenderBox.prototype.setPixels = function(startPixel, endPixel) {
this.startPixel_ = startPixel;
this.endPixel_ = endPixel;
this.createOrUpdateGeometry();
@@ -105,7 +105,7 @@ _ol_render_Box_.prototype.setPixels = function(startPixel, endPixel) {
/**
* Creates or updates the cached geometry.
*/
_ol_render_Box_.prototype.createOrUpdateGeometry = function() {
RenderBox.prototype.createOrUpdateGeometry = function() {
const startPixel = this.startPixel_;
const endPixel = this.endPixel_;
const pixels = [
@@ -128,7 +128,7 @@ _ol_render_Box_.prototype.createOrUpdateGeometry = function() {
/**
* @return {ol.geom.Polygon} Geometry.
*/
_ol_render_Box_.prototype.getGeometry = function() {
RenderBox.prototype.getGeometry = function() {
return this.geometry_;
};
export default _ol_render_Box_;
export default RenderBox;