Rename source.RasterEvent* to source.Raster.Event*
This commit is contained in:
@@ -39,6 +39,8 @@ A number of internal types have been renamed. This will not affect those who us
|
|||||||
* rename `ol.RendererType` to `ol.renderer.Type`
|
* rename `ol.RendererType` to `ol.renderer.Type`
|
||||||
* rename `ol.source.ImageEvent` to `ol.source.Image.Event`
|
* rename `ol.source.ImageEvent` to `ol.source.Image.Event`
|
||||||
* rename `ol.source.ImageEventType` to `ol.source.Image.EventType`
|
* rename `ol.source.ImageEventType` to `ol.source.Image.EventType`
|
||||||
|
* rename `ol.source.RasterEvent` to `ol.source.Raster.Event`
|
||||||
|
* rename `ol.source.RasterEventType` to `ol.source.Raster.EventType`
|
||||||
* rename `ol.source.TileEvent` to `ol.source.Tile.Event`
|
* rename `ol.source.TileEvent` to `ol.source.Tile.Event`
|
||||||
* rename `ol.source.TileEventType` to `ol.source.Tile.EventType`
|
* rename `ol.source.TileEventType` to `ol.source.Tile.EventType`
|
||||||
* rename `ol.source.VectorEvent` to `ol.source.Vector.Event`
|
* rename `ol.source.VectorEvent` to `ol.source.Vector.Event`
|
||||||
|
|||||||
+10
-12
@@ -1,7 +1,5 @@
|
|||||||
goog.provide('ol.source.Raster');
|
goog.provide('ol.source.Raster');
|
||||||
goog.provide('ol.RasterOperationType');
|
goog.provide('ol.RasterOperationType');
|
||||||
goog.provide('ol.source.RasterEvent');
|
|
||||||
goog.provide('ol.source.RasterEventType');
|
|
||||||
|
|
||||||
goog.require('ol');
|
goog.require('ol');
|
||||||
goog.require('ol.transform');
|
goog.require('ol.transform');
|
||||||
@@ -41,7 +39,7 @@ ol.RasterOperationType = {
|
|||||||
*
|
*
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends {ol.source.Image}
|
* @extends {ol.source.Image}
|
||||||
* @fires ol.source.RasterEvent
|
* @fires ol.source.Raster.Event
|
||||||
* @param {olx.source.RasterOptions} options Options.
|
* @param {olx.source.RasterOptions} options Options.
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
@@ -305,8 +303,8 @@ ol.source.Raster.prototype.composeFrame_ = function(frameState, callback) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var data = {};
|
var data = {};
|
||||||
this.dispatchEvent(new ol.source.RasterEvent(
|
this.dispatchEvent(new ol.source.Raster.Event(
|
||||||
ol.source.RasterEventType.BEFOREOPERATIONS, frameState, data));
|
ol.source.Raster.EventType.BEFOREOPERATIONS, frameState, data));
|
||||||
|
|
||||||
this.worker_.process(imageDatas, data,
|
this.worker_.process(imageDatas, data,
|
||||||
this.onWorkerComplete_.bind(this, frameState, callback));
|
this.onWorkerComplete_.bind(this, frameState, callback));
|
||||||
@@ -334,8 +332,8 @@ ol.source.Raster.prototype.onWorkerComplete_ = function(frameState, callback, er
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.dispatchEvent(new ol.source.RasterEvent(
|
this.dispatchEvent(new ol.source.Raster.Event(
|
||||||
ol.source.RasterEventType.AFTEROPERATIONS, frameState, data));
|
ol.source.Raster.EventType.AFTEROPERATIONS, frameState, data));
|
||||||
|
|
||||||
var resolution = frameState.viewState.resolution / frameState.pixelRatio;
|
var resolution = frameState.viewState.resolution / frameState.pixelRatio;
|
||||||
if (!this.isDirty_(frameState.extent, resolution)) {
|
if (!this.isDirty_(frameState.extent, resolution)) {
|
||||||
@@ -467,7 +465,7 @@ ol.source.Raster.createTileRenderer_ = function(source) {
|
|||||||
* @param {olx.FrameState} frameState The frame state.
|
* @param {olx.FrameState} frameState The frame state.
|
||||||
* @param {Object} data An object made available to operations.
|
* @param {Object} data An object made available to operations.
|
||||||
*/
|
*/
|
||||||
ol.source.RasterEvent = function(type, frameState, data) {
|
ol.source.Raster.Event = function(type, frameState, data) {
|
||||||
ol.events.Event.call(this, type);
|
ol.events.Event.call(this, type);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -493,23 +491,23 @@ ol.source.RasterEvent = function(type, frameState, data) {
|
|||||||
this.data = data;
|
this.data = data;
|
||||||
|
|
||||||
};
|
};
|
||||||
ol.inherits(ol.source.RasterEvent, ol.events.Event);
|
ol.inherits(ol.source.Raster.Event, ol.events.Event);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @enum {string}
|
* @enum {string}
|
||||||
*/
|
*/
|
||||||
ol.source.RasterEventType = {
|
ol.source.Raster.EventType = {
|
||||||
/**
|
/**
|
||||||
* Triggered before operations are run.
|
* Triggered before operations are run.
|
||||||
* @event ol.source.RasterEvent#beforeoperations
|
* @event ol.source.Raster.Event#beforeoperations
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
BEFOREOPERATIONS: 'beforeoperations',
|
BEFOREOPERATIONS: 'beforeoperations',
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Triggered after operations are run.
|
* Triggered after operations are run.
|
||||||
* @event ol.source.RasterEvent#afteroperations
|
* @event ol.source.Raster.Event#afteroperations
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
AFTEROPERATIONS: 'afteroperations'
|
AFTEROPERATIONS: 'afteroperations'
|
||||||
|
|||||||
Reference in New Issue
Block a user