DSDSWeb/static/js/Cesium-1.53/Specs/MockDataSource.js

34 lines
878 B
JavaScript
Raw Normal View History

2024-07-11 18:02:47 +08:00
define([
'Core/Event',
'DataSources/EntityCluster',
'DataSources/EntityCollection'
], function(
Event,
EntityCluster,
EntityCollection) {
'use strict';
function MockDataSource() {
//Values to be fiddled with by the test
this.changedEvent = new Event();
this.errorEvent = new Event();
this.entities = new EntityCollection();
this.name = 'Mock Data';
this.clock = undefined;
this.isTimeVarying = false;
this.isLoading = false;
this.loadingEvent = new Event();
this.destroyed = false;
this.clustering = new EntityCluster();
}
MockDataSource.prototype.update = function() {
return true;
};
MockDataSource.prototype.destroy = function() {
this.destroyed = true;
};
return MockDataSource;
});