map/client/mixins/globe/mixin.base-globe.js
Showing 15 of 15 total issues
baseGlobe
has 54 functions (exceeds 20 allowed). Consider refactoring. Open
Open
methods: { refreshGlobe () { }, setupGlobe (domEl, token, options = {}) { this.viewerOptions = _.defaults(options, _.get(this, 'activityOptions.engine.viewer', {}), {
File mixin.base-globe.js
has 646 lines of code (exceeds 500 allowed). Consider refactoring. Open
Open
import _ from 'lodash'import sift from 'sift'import logger from 'loglevel'import Emitter from 'tiny-emitter'import { getCssVar } from 'quasar'
Function getDefaultPickHandler
has a Cognitive Complexity of 35 (exceeds 20 allowed). Consider refactoring. Open
Open
async getDefaultPickHandler (event) { const emittedEvent = {} let options let pickedPosition = this.viewer.camera.pickEllipsoid(event.endPosition || event.position, this.viewer.scene.globe.ellipsoid) if (pickedPosition) {
- Read upRead up
Function center
has 61 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
center (longitude, latitude, altitude, heading = 0, pitch = -90, roll = 0, options = {}) { const center = this.viewer.camera.positionCartographic const duration = _.get(options, 'duration', 0) // This is the "base" frame, position with orientation in east north up frame at position const destination = Cartesian3.fromDegrees(longitude, latitude, altitude || center.height)
Function setupGlobe
has 54 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
setupGlobe (domEl, token, options = {}) { this.viewerOptions = _.defaults(options, _.get(this, 'activityOptions.engine.viewer', {}), { sceneMode: 3, // SceneMode.COLUMBUS_VIEW = 1, SceneMode.SCENE3D = 3, sceneModePicker: false, infoBox: false,
Function center
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
center (longitude, latitude, altitude, heading = 0, pitch = -90, roll = 0, options = {}) {
Avoid deeply nested control flow statements. Open
Open
if (geoJson.features.length > 0) { Object.assign(feature, geoJson.features[0]) }
Function createCesiumLayer
has a Cognitive Complexity of 23 (exceeds 20 allowed). Consider refactoring. Open
Open
async createCesiumLayer (options) { let cesiumOptions = options.cesium || options // Convert required objects cesiumOptions = this.convertToCesiumObjects(cesiumOptions) let args = [cesiumOptions]
- Read upRead up
Function zoomToBBox
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
zoomToBBox (bbox, heading = 0, pitch = -90, roll = 0, duration = 0) {
Function zoomToBounds
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
zoomToBounds (bounds, heading = 0, pitch = -90, roll = 0, duration = 0) {
Avoid too many return
statements within this function. Open
Open
return this.viewer.dataSources.contains(cesiumLayer)
TODO found Open
Open
// TODO: no specific marker to show yet
- Exclude checks
TODO found Open
Open
// TODO
- Exclude checks
FIXME found Open
Open
// FIXME: should it be a problem with real-time updates ?
- Exclude checks
TODO found Open
Open
// TODO: no specific marker, just keep status
- Exclude checks