Remove static members from BaseObject
This commit is contained in:
+4
-4
@@ -5,7 +5,7 @@ import {assert} from './asserts.js';
|
|||||||
import {listen, unlisten, unlistenByKey} from './events.js';
|
import {listen, unlisten, unlistenByKey} from './events.js';
|
||||||
import EventType from './events/EventType.js';
|
import EventType from './events/EventType.js';
|
||||||
import {inherits} from './index.js';
|
import {inherits} from './index.js';
|
||||||
import BaseObject from './Object.js';
|
import BaseObject, {getChangeEventType} from './Object.js';
|
||||||
import Geometry from './geom/Geometry.js';
|
import Geometry from './geom/Geometry.js';
|
||||||
import Style from './style/Style.js';
|
import Style from './style/Style.js';
|
||||||
|
|
||||||
@@ -90,7 +90,7 @@ const Feature = function(opt_geometryOrProperties) {
|
|||||||
this.geometryChangeKey_ = null;
|
this.geometryChangeKey_ = null;
|
||||||
|
|
||||||
listen(
|
listen(
|
||||||
this, BaseObject.getChangeEventType(this.geometryName_),
|
this, getChangeEventType(this.geometryName_),
|
||||||
this.handleGeometryChanged_, this);
|
this.handleGeometryChanged_, this);
|
||||||
|
|
||||||
if (opt_geometryOrProperties !== undefined) {
|
if (opt_geometryOrProperties !== undefined) {
|
||||||
@@ -266,11 +266,11 @@ Feature.prototype.setId = function(id) {
|
|||||||
*/
|
*/
|
||||||
Feature.prototype.setGeometryName = function(name) {
|
Feature.prototype.setGeometryName = function(name) {
|
||||||
unlisten(
|
unlisten(
|
||||||
this, BaseObject.getChangeEventType(this.geometryName_),
|
this, getChangeEventType(this.geometryName_),
|
||||||
this.handleGeometryChanged_, this);
|
this.handleGeometryChanged_, this);
|
||||||
this.geometryName_ = name;
|
this.geometryName_ = name;
|
||||||
listen(
|
listen(
|
||||||
this, BaseObject.getChangeEventType(this.geometryName_),
|
this, getChangeEventType(this.geometryName_),
|
||||||
this.handleGeometryChanged_, this);
|
this.handleGeometryChanged_, this);
|
||||||
this.handleGeometryChanged_();
|
this.handleGeometryChanged_();
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
*/
|
*/
|
||||||
import {inherits} from './index.js';
|
import {inherits} from './index.js';
|
||||||
import GeolocationProperty from './GeolocationProperty.js';
|
import GeolocationProperty from './GeolocationProperty.js';
|
||||||
import BaseObject from './Object.js';
|
import BaseObject, {getChangeEventType} from './Object.js';
|
||||||
import {listen} from './events.js';
|
import {listen} from './events.js';
|
||||||
import EventType from './events/EventType.js';
|
import EventType from './events/EventType.js';
|
||||||
import {circular as circularPolygon} from './geom/Polygon.js';
|
import {circular as circularPolygon} from './geom/Polygon.js';
|
||||||
@@ -79,10 +79,10 @@ const Geolocation = function(opt_options) {
|
|||||||
this.watchId_ = undefined;
|
this.watchId_ = undefined;
|
||||||
|
|
||||||
listen(
|
listen(
|
||||||
this, BaseObject.getChangeEventType(GeolocationProperty.PROJECTION),
|
this, getChangeEventType(GeolocationProperty.PROJECTION),
|
||||||
this.handleProjectionChanged_, this);
|
this.handleProjectionChanged_, this);
|
||||||
listen(
|
listen(
|
||||||
this, BaseObject.getChangeEventType(GeolocationProperty.TRACKING),
|
this, getChangeEventType(GeolocationProperty.TRACKING),
|
||||||
this.handleTrackingChanged_, this);
|
this.handleTrackingChanged_, this);
|
||||||
|
|
||||||
if (options.projection !== undefined) {
|
if (options.projection !== undefined) {
|
||||||
|
|||||||
+39
-36
@@ -7,6 +7,40 @@ import Observable from './Observable.js';
|
|||||||
import Event from './events/Event.js';
|
import Event from './events/Event.js';
|
||||||
import {assign} from './obj.js';
|
import {assign} from './obj.js';
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @classdesc
|
||||||
|
* Events emitted by {@link ol.Object} instances are instances of this type.
|
||||||
|
*
|
||||||
|
* @param {string} type The event type.
|
||||||
|
* @param {string} key The property name.
|
||||||
|
* @param {*} oldValue The old value for `key`.
|
||||||
|
* @extends {ol.events.Event}
|
||||||
|
* @implements {oli.Object.Event}
|
||||||
|
* @constructor
|
||||||
|
*/
|
||||||
|
const BaseObjectEvent = function(type, key, oldValue) {
|
||||||
|
Event.call(this, type);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The name of the property whose value is changing.
|
||||||
|
* @type {string}
|
||||||
|
* @api
|
||||||
|
*/
|
||||||
|
this.key = key;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The old value. To get the new value use `e.target.get(e.key)` where
|
||||||
|
* `e` is the event object.
|
||||||
|
* @type {*}
|
||||||
|
* @api
|
||||||
|
*/
|
||||||
|
this.oldValue = oldValue;
|
||||||
|
|
||||||
|
};
|
||||||
|
inherits(BaseObjectEvent, Event);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @classdesc
|
* @classdesc
|
||||||
* Abstract base class; normally only used for creating subclasses and not
|
* Abstract base class; normally only used for creating subclasses and not
|
||||||
@@ -85,11 +119,11 @@ const changeEventTypeCache = {};
|
|||||||
* @param {string} key Key name.
|
* @param {string} key Key name.
|
||||||
* @return {string} Change name.
|
* @return {string} Change name.
|
||||||
*/
|
*/
|
||||||
BaseObject.getChangeEventType = function(key) {
|
export function getChangeEventType(key) {
|
||||||
return changeEventTypeCache.hasOwnProperty(key) ?
|
return changeEventTypeCache.hasOwnProperty(key) ?
|
||||||
changeEventTypeCache[key] :
|
changeEventTypeCache[key] :
|
||||||
(changeEventTypeCache[key] = 'change:' + key);
|
(changeEventTypeCache[key] = 'change:' + key);
|
||||||
};
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -133,10 +167,10 @@ BaseObject.prototype.getProperties = function() {
|
|||||||
*/
|
*/
|
||||||
BaseObject.prototype.notify = function(key, oldValue) {
|
BaseObject.prototype.notify = function(key, oldValue) {
|
||||||
let eventType;
|
let eventType;
|
||||||
eventType = BaseObject.getChangeEventType(key);
|
eventType = getChangeEventType(key);
|
||||||
this.dispatchEvent(new BaseObject.Event(eventType, key, oldValue));
|
this.dispatchEvent(new BaseObjectEvent(eventType, key, oldValue));
|
||||||
eventType = ObjectEventType.PROPERTYCHANGE;
|
eventType = ObjectEventType.PROPERTYCHANGE;
|
||||||
this.dispatchEvent(new BaseObject.Event(eventType, key, oldValue));
|
this.dispatchEvent(new BaseObjectEvent(eventType, key, oldValue));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -191,35 +225,4 @@ BaseObject.prototype.unset = function(key, opt_silent) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @classdesc
|
|
||||||
* Events emitted by {@link ol.Object} instances are instances of this type.
|
|
||||||
*
|
|
||||||
* @param {string} type The event type.
|
|
||||||
* @param {string} key The property name.
|
|
||||||
* @param {*} oldValue The old value for `key`.
|
|
||||||
* @extends {ol.events.Event}
|
|
||||||
* @implements {oli.Object.Event}
|
|
||||||
* @constructor
|
|
||||||
*/
|
|
||||||
BaseObject.Event = function(type, key, oldValue) {
|
|
||||||
Event.call(this, type);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The name of the property whose value is changing.
|
|
||||||
* @type {string}
|
|
||||||
* @api
|
|
||||||
*/
|
|
||||||
this.key = key;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The old value. To get the new value use `e.target.get(e.key)` where
|
|
||||||
* `e` is the event object.
|
|
||||||
* @type {*}
|
|
||||||
* @api
|
|
||||||
*/
|
|
||||||
this.oldValue = oldValue;
|
|
||||||
|
|
||||||
};
|
|
||||||
inherits(BaseObject.Event, Event);
|
|
||||||
export default BaseObject;
|
export default BaseObject;
|
||||||
|
|||||||
+6
-6
@@ -3,7 +3,7 @@
|
|||||||
*/
|
*/
|
||||||
import {inherits} from './index.js';
|
import {inherits} from './index.js';
|
||||||
import MapEventType from './MapEventType.js';
|
import MapEventType from './MapEventType.js';
|
||||||
import BaseObject from './Object.js';
|
import BaseObject, {getChangeEventType} from './Object.js';
|
||||||
import OverlayPositioning from './OverlayPositioning.js';
|
import OverlayPositioning from './OverlayPositioning.js';
|
||||||
import {CLASS_SELECTABLE} from './css.js';
|
import {CLASS_SELECTABLE} from './css.js';
|
||||||
import {removeNode, removeChildren, outerWidth, outerHeight} from './dom.js';
|
import {removeNode, removeChildren, outerWidth, outerHeight} from './dom.js';
|
||||||
@@ -126,23 +126,23 @@ const Overlay = function(options) {
|
|||||||
this.mapPostrenderListenerKey = null;
|
this.mapPostrenderListenerKey = null;
|
||||||
|
|
||||||
listen(
|
listen(
|
||||||
this, BaseObject.getChangeEventType(Property.ELEMENT),
|
this, getChangeEventType(Property.ELEMENT),
|
||||||
this.handleElementChanged, this);
|
this.handleElementChanged, this);
|
||||||
|
|
||||||
listen(
|
listen(
|
||||||
this, BaseObject.getChangeEventType(Property.MAP),
|
this, getChangeEventType(Property.MAP),
|
||||||
this.handleMapChanged, this);
|
this.handleMapChanged, this);
|
||||||
|
|
||||||
listen(
|
listen(
|
||||||
this, BaseObject.getChangeEventType(Property.OFFSET),
|
this, getChangeEventType(Property.OFFSET),
|
||||||
this.handleOffsetChanged, this);
|
this.handleOffsetChanged, this);
|
||||||
|
|
||||||
listen(
|
listen(
|
||||||
this, BaseObject.getChangeEventType(Property.POSITION),
|
this, getChangeEventType(Property.POSITION),
|
||||||
this.handlePositionChanged, this);
|
this.handlePositionChanged, this);
|
||||||
|
|
||||||
listen(
|
listen(
|
||||||
this, BaseObject.getChangeEventType(Property.POSITIONING),
|
this, getChangeEventType(Property.POSITIONING),
|
||||||
this.handlePositioningChanged, this);
|
this.handlePositioningChanged, this);
|
||||||
|
|
||||||
if (options.element !== undefined) {
|
if (options.element !== undefined) {
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import MapBrowserEventType from './MapBrowserEventType.js';
|
|||||||
import MapEvent from './MapEvent.js';
|
import MapEvent from './MapEvent.js';
|
||||||
import MapEventType from './MapEventType.js';
|
import MapEventType from './MapEventType.js';
|
||||||
import MapProperty from './MapProperty.js';
|
import MapProperty from './MapProperty.js';
|
||||||
import BaseObject from './Object.js';
|
import BaseObject, {getChangeEventType} from './Object.js';
|
||||||
import ObjectEventType from './ObjectEventType.js';
|
import ObjectEventType from './ObjectEventType.js';
|
||||||
import TileQueue from './TileQueue.js';
|
import TileQueue from './TileQueue.js';
|
||||||
import View from './View.js';
|
import View from './View.js';
|
||||||
@@ -346,13 +346,13 @@ const PluggableMap = function(options) {
|
|||||||
this.skippedFeatureUids_ = {};
|
this.skippedFeatureUids_ = {};
|
||||||
|
|
||||||
listen(
|
listen(
|
||||||
this, BaseObject.getChangeEventType(MapProperty.LAYERGROUP),
|
this, getChangeEventType(MapProperty.LAYERGROUP),
|
||||||
this.handleLayerGroupChanged_, this);
|
this.handleLayerGroupChanged_, this);
|
||||||
listen(this, BaseObject.getChangeEventType(MapProperty.VIEW),
|
listen(this, getChangeEventType(MapProperty.VIEW),
|
||||||
this.handleViewChanged_, this);
|
this.handleViewChanged_, this);
|
||||||
listen(this, BaseObject.getChangeEventType(MapProperty.SIZE),
|
listen(this, getChangeEventType(MapProperty.SIZE),
|
||||||
this.handleSizeChanged_, this);
|
this.handleSizeChanged_, this);
|
||||||
listen(this, BaseObject.getChangeEventType(MapProperty.TARGET),
|
listen(this, getChangeEventType(MapProperty.TARGET),
|
||||||
this.handleTargetChanged_, this);
|
this.handleTargetChanged_, this);
|
||||||
|
|
||||||
// setProperties will trigger the rendering of the map if the map
|
// setProperties will trigger the rendering of the map if the map
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
import {inherits} from '../index.js';
|
import {inherits} from '../index.js';
|
||||||
import {listen} from '../events.js';
|
import {listen} from '../events.js';
|
||||||
import EventType from '../events/EventType.js';
|
import EventType from '../events/EventType.js';
|
||||||
import BaseObject from '../Object.js';
|
import {getChangeEventType} from '../Object.js';
|
||||||
import Control from '../control/Control.js';
|
import Control from '../control/Control.js';
|
||||||
import {getTransformFromProjections, identityTransform, get as getProjection} from '../proj.js';
|
import {getTransformFromProjections, identityTransform, get as getProjection} from '../proj.js';
|
||||||
|
|
||||||
@@ -48,7 +48,7 @@ const MousePosition = function(opt_options) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
listen(this,
|
listen(this,
|
||||||
BaseObject.getChangeEventType(PROJECTION),
|
getChangeEventType(PROJECTION),
|
||||||
this.handleProjectionChanged_, this);
|
this.handleProjectionChanged_, this);
|
||||||
|
|
||||||
if (options.coordinateFormat) {
|
if (options.coordinateFormat) {
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import Collection from '../Collection.js';
|
|||||||
import PluggableMap from '../PluggableMap.js';
|
import PluggableMap from '../PluggableMap.js';
|
||||||
import MapEventType from '../MapEventType.js';
|
import MapEventType from '../MapEventType.js';
|
||||||
import MapProperty from '../MapProperty.js';
|
import MapProperty from '../MapProperty.js';
|
||||||
import BaseObject from '../Object.js';
|
import {getChangeEventType} from '../Object.js';
|
||||||
import ObjectEventType from '../ObjectEventType.js';
|
import ObjectEventType from '../ObjectEventType.js';
|
||||||
import Overlay from '../Overlay.js';
|
import Overlay from '../Overlay.js';
|
||||||
import OverlayPositioning from '../OverlayPositioning.js';
|
import OverlayPositioning from '../OverlayPositioning.js';
|
||||||
@@ -270,7 +270,7 @@ OverviewMap.prototype.handleMapPropertyChange_ = function(event) {
|
|||||||
*/
|
*/
|
||||||
OverviewMap.prototype.bindView_ = function(view) {
|
OverviewMap.prototype.bindView_ = function(view) {
|
||||||
listen(view,
|
listen(view,
|
||||||
BaseObject.getChangeEventType(ViewProperty.ROTATION),
|
getChangeEventType(ViewProperty.ROTATION),
|
||||||
this.handleRotationChanged_, this);
|
this.handleRotationChanged_, this);
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -282,7 +282,7 @@ OverviewMap.prototype.bindView_ = function(view) {
|
|||||||
*/
|
*/
|
||||||
OverviewMap.prototype.unbindView_ = function(view) {
|
OverviewMap.prototype.unbindView_ = function(view) {
|
||||||
unlisten(view,
|
unlisten(view,
|
||||||
BaseObject.getChangeEventType(ViewProperty.ROTATION),
|
getChangeEventType(ViewProperty.ROTATION),
|
||||||
this.handleRotationChanged_, this);
|
this.handleRotationChanged_, this);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* @module ol/control/ScaleLine
|
* @module ol/control/ScaleLine
|
||||||
*/
|
*/
|
||||||
import {inherits} from '../index.js';
|
import {inherits} from '../index.js';
|
||||||
import BaseObject from '../Object.js';
|
import {getChangeEventType} from '../Object.js';
|
||||||
import {assert} from '../asserts.js';
|
import {assert} from '../asserts.js';
|
||||||
import Control from '../control/Control.js';
|
import Control from '../control/Control.js';
|
||||||
import ScaleLineUnits from '../control/ScaleLineUnits.js';
|
import ScaleLineUnits from '../control/ScaleLineUnits.js';
|
||||||
@@ -98,7 +98,7 @@ const ScaleLine = function(opt_options) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
listen(
|
listen(
|
||||||
this, BaseObject.getChangeEventType(UNITS),
|
this, getChangeEventType(UNITS),
|
||||||
this.handleUnitsChanged_, this);
|
this.handleUnitsChanged_, this);
|
||||||
|
|
||||||
this.setUnits(/** @type {ol.control.ScaleLineUnits} */ (options.units) ||
|
this.setUnits(/** @type {ol.control.ScaleLineUnits} */ (options.units) ||
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import EventType from '../events/EventType.js';
|
|||||||
import Feature from '../Feature.js';
|
import Feature from '../Feature.js';
|
||||||
import MapBrowserEventType from '../MapBrowserEventType.js';
|
import MapBrowserEventType from '../MapBrowserEventType.js';
|
||||||
import MapBrowserPointerEvent from '../MapBrowserPointerEvent.js';
|
import MapBrowserPointerEvent from '../MapBrowserPointerEvent.js';
|
||||||
import BaseObject from '../Object.js';
|
import {getChangeEventType} from '../Object.js';
|
||||||
import {squaredDistance as squaredCoordinateDistance} from '../coordinate.js';
|
import {squaredDistance as squaredCoordinateDistance} from '../coordinate.js';
|
||||||
import {listen} from '../events.js';
|
import {listen} from '../events.js';
|
||||||
import Event from '../events/Event.js';
|
import Event from '../events/Event.js';
|
||||||
@@ -365,7 +365,7 @@ const Draw = function(options) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
listen(this,
|
listen(this,
|
||||||
BaseObject.getChangeEventType(InteractionProperty.ACTIVE),
|
getChangeEventType(InteractionProperty.ACTIVE),
|
||||||
this.updateState_, this);
|
this.updateState_, this);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
*/
|
*/
|
||||||
import {inherits} from '../index.js';
|
import {inherits} from '../index.js';
|
||||||
import Collection from '../Collection.js';
|
import Collection from '../Collection.js';
|
||||||
import BaseObject from '../Object.js';
|
import {getChangeEventType} from '../Object.js';
|
||||||
import {listen} from '../events.js';
|
import {listen} from '../events.js';
|
||||||
import Event from '../events/Event.js';
|
import Event from '../events/Event.js';
|
||||||
import {TRUE} from '../functions.js';
|
import {TRUE} from '../functions.js';
|
||||||
@@ -80,7 +80,7 @@ const Translate = function(opt_options) {
|
|||||||
this.lastFeature_ = null;
|
this.lastFeature_ = null;
|
||||||
|
|
||||||
listen(this,
|
listen(this,
|
||||||
BaseObject.getChangeEventType(InteractionProperty.ACTIVE),
|
getChangeEventType(InteractionProperty.ACTIVE),
|
||||||
this.handleActiveChanged_, this);
|
this.handleActiveChanged_, this);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
import {getUid, inherits} from '../index.js';
|
import {getUid, inherits} from '../index.js';
|
||||||
import Collection from '../Collection.js';
|
import Collection from '../Collection.js';
|
||||||
import CollectionEventType from '../CollectionEventType.js';
|
import CollectionEventType from '../CollectionEventType.js';
|
||||||
import BaseObject from '../Object.js';
|
import {getChangeEventType} from '../Object.js';
|
||||||
import ObjectEventType from '../ObjectEventType.js';
|
import ObjectEventType from '../ObjectEventType.js';
|
||||||
import {assert} from '../asserts.js';
|
import {assert} from '../asserts.js';
|
||||||
import {listen, unlistenByKey} from '../events.js';
|
import {listen, unlistenByKey} from '../events.js';
|
||||||
@@ -58,7 +58,7 @@ const LayerGroup = function(opt_options) {
|
|||||||
this.listenerKeys_ = {};
|
this.listenerKeys_ = {};
|
||||||
|
|
||||||
listen(this,
|
listen(this,
|
||||||
BaseObject.getChangeEventType(Property.LAYERS),
|
getChangeEventType(Property.LAYERS),
|
||||||
this.handleLayersChanged_, this);
|
this.handleLayersChanged_, this);
|
||||||
|
|
||||||
if (layers) {
|
if (layers) {
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
*/
|
*/
|
||||||
import {listen} from '../events.js';
|
import {listen} from '../events.js';
|
||||||
import {inherits} from '../index.js';
|
import {inherits} from '../index.js';
|
||||||
import BaseObject from '../Object.js';
|
import {getChangeEventType} from '../Object.js';
|
||||||
import {createCanvasContext2D} from '../dom.js';
|
import {createCanvasContext2D} from '../dom.js';
|
||||||
import VectorLayer from '../layer/Vector.js';
|
import VectorLayer from '../layer/Vector.js';
|
||||||
import {clamp} from '../math.js';
|
import {clamp} from '../math.js';
|
||||||
@@ -81,7 +81,7 @@ const Heatmap = function(opt_options) {
|
|||||||
this.styleCache_ = null;
|
this.styleCache_ = null;
|
||||||
|
|
||||||
listen(this,
|
listen(this,
|
||||||
BaseObject.getChangeEventType(Property.GRADIENT),
|
getChangeEventType(Property.GRADIENT),
|
||||||
this.handleGradientChanged_, this);
|
this.handleGradientChanged_, this);
|
||||||
|
|
||||||
this.setGradient(options.gradient ? options.gradient : DEFAULT_GRADIENT);
|
this.setGradient(options.gradient ? options.gradient : DEFAULT_GRADIENT);
|
||||||
@@ -91,10 +91,10 @@ const Heatmap = function(opt_options) {
|
|||||||
this.setRadius(options.radius !== undefined ? options.radius : 8);
|
this.setRadius(options.radius !== undefined ? options.radius : 8);
|
||||||
|
|
||||||
listen(this,
|
listen(this,
|
||||||
BaseObject.getChangeEventType(Property.BLUR),
|
getChangeEventType(Property.BLUR),
|
||||||
this.handleStyleChanged_, this);
|
this.handleStyleChanged_, this);
|
||||||
listen(this,
|
listen(this,
|
||||||
BaseObject.getChangeEventType(Property.RADIUS),
|
getChangeEventType(Property.RADIUS),
|
||||||
this.handleStyleChanged_, this);
|
this.handleStyleChanged_, this);
|
||||||
|
|
||||||
this.handleStyleChanged_();
|
this.handleStyleChanged_();
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
import {listen, unlistenByKey} from '../events.js';
|
import {listen, unlistenByKey} from '../events.js';
|
||||||
import EventType from '../events/EventType.js';
|
import EventType from '../events/EventType.js';
|
||||||
import {getUid, inherits} from '../index.js';
|
import {getUid, inherits} from '../index.js';
|
||||||
import BaseObject from '../Object.js';
|
import {getChangeEventType} from '../Object.js';
|
||||||
import BaseLayer from '../layer/Base.js';
|
import BaseLayer from '../layer/Base.js';
|
||||||
import LayerProperty from '../layer/Property.js';
|
import LayerProperty from '../layer/Property.js';
|
||||||
import {assign} from '../obj.js';
|
import {assign} from '../obj.js';
|
||||||
@@ -63,7 +63,7 @@ const Layer = function(options) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
listen(this,
|
listen(this,
|
||||||
BaseObject.getChangeEventType(LayerProperty.SOURCE),
|
getChangeEventType(LayerProperty.SOURCE),
|
||||||
this.handleSourcePropertyChange_, this);
|
this.handleSourcePropertyChange_, this);
|
||||||
|
|
||||||
const source = options.source ? options.source : null;
|
const source = options.source ? options.source : null;
|
||||||
|
|||||||
Reference in New Issue
Block a user