mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Chore: fix .eslintignore
to only ignore folder paths at the root (#72032)
fix eslintignore to only ignore folder paths at the root
This commit is contained in:
parent
892a0d2e5e
commit
01369e6aff
@ -2682,6 +2682,23 @@ exports[`better eslint`] = {
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "1"]
|
||||
],
|
||||
"public/app/features/live/data/StreamingDataFrame.ts:5381": [
|
||||
[0, 0, 0, "Do not use any type assertions.", "0"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "1"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "2"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "3"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "4"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "5"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "6"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "7"]
|
||||
],
|
||||
"public/app/features/live/data/amendTimeSeries.ts:5381": [
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "1"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "2"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "3"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "4"]
|
||||
],
|
||||
"public/app/features/live/index.ts:5381": [
|
||||
[0, 0, 0, "Do not use any type assertions.", "0"]
|
||||
],
|
||||
@ -4853,6 +4870,26 @@ exports[`better eslint`] = {
|
||||
"public/app/plugins/panel/geomap/layers/basemaps/esri.ts:5381": [
|
||||
[0, 0, 0, "Do not use any type assertions.", "0"]
|
||||
],
|
||||
"public/app/plugins/panel/geomap/layers/data/dayNightLayer.tsx:5381": [
|
||||
[0, 0, 0, "Do not use any type assertions.", "0"]
|
||||
],
|
||||
"public/app/plugins/panel/geomap/layers/data/geojsonDynamic.ts:5381": [
|
||||
[0, 0, 0, "Do not use any type assertions.", "0"]
|
||||
],
|
||||
"public/app/plugins/panel/geomap/layers/data/heatMap.tsx:5381": [
|
||||
[0, 0, 0, "Do not use any type assertions.", "0"]
|
||||
],
|
||||
"public/app/plugins/panel/geomap/layers/data/markersLayer.tsx:5381": [
|
||||
[0, 0, 0, "Do not use any type assertions.", "0"]
|
||||
],
|
||||
"public/app/plugins/panel/geomap/layers/data/photosLayer.tsx:5381": [
|
||||
[0, 0, 0, "Do not use any type assertions.", "0"]
|
||||
],
|
||||
"public/app/plugins/panel/geomap/layers/data/routeLayer.tsx:5381": [
|
||||
[0, 0, 0, "Do not use any type assertions.", "0"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "1"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "2"]
|
||||
],
|
||||
"public/app/plugins/panel/geomap/layers/registry.ts:5381": [
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "1"]
|
||||
|
@ -3,23 +3,23 @@
|
||||
.yarn
|
||||
build
|
||||
compiled
|
||||
data
|
||||
/data
|
||||
deployment_tools_config.json
|
||||
devenv
|
||||
/devenv
|
||||
dist
|
||||
e2e/tmp
|
||||
/e2e/tmp
|
||||
node_modules
|
||||
pkg
|
||||
public/lib/monaco
|
||||
scripts/grafana-server/tmp
|
||||
/pkg
|
||||
/public/lib/monaco
|
||||
/scripts/grafana-server/tmp
|
||||
vendor
|
||||
|
||||
# TS generate from cue by cuetsy
|
||||
**/*.gen.ts
|
||||
|
||||
# Auto-generated internationalization files
|
||||
public/locales/_build/
|
||||
public/locales/**/*.js
|
||||
/public/locales/_build/
|
||||
/public/locales/**/*.js
|
||||
|
||||
# Auto-generated icon file
|
||||
packages/grafana-ui/src/components/Icon/iconBundle.ts
|
||||
/packages/grafana-ui/src/components/Icon/iconBundle.ts
|
||||
|
@ -1,5 +1,6 @@
|
||||
import { DataFrame, DataFrameJSON, FieldType, getFieldDisplayName, reduceField, ReducerID } from '@grafana/data';
|
||||
import { StreamingFrameAction, StreamingFrameOptions } from '@grafana/runtime';
|
||||
|
||||
import { closestIdx, getStreamingFrameOptions, StreamingDataFrame } from './StreamingDataFrame';
|
||||
|
||||
describe('Streaming JSON', () => {
|
||||
|
@ -1,3 +1,5 @@
|
||||
import { AlignedData } from 'uplot';
|
||||
|
||||
import {
|
||||
DataFrame,
|
||||
DataFrameJSON,
|
||||
@ -15,7 +17,6 @@ import {
|
||||
import { join } from '@grafana/data/src/transformations/transformers/joinDataFrames';
|
||||
import { StreamingFrameAction, StreamingFrameOptions } from '@grafana/runtime/src/services/live';
|
||||
import { renderLegendFormat } from 'app/plugins/datasource/prometheus/legend';
|
||||
import { AlignedData } from 'uplot';
|
||||
|
||||
/**
|
||||
* Stream packet info is attached to StreamingDataFrames and indicate how many
|
||||
|
@ -1,4 +1,5 @@
|
||||
import { DataQueryResponseData, isDataFrame } from '@grafana/data';
|
||||
|
||||
import { StreamingDataFrame } from './StreamingDataFrame';
|
||||
|
||||
/**
|
||||
|
@ -1,3 +1,16 @@
|
||||
import Feature from 'ol/Feature';
|
||||
import Map from 'ol/Map';
|
||||
import { Coordinate } from 'ol/coordinate';
|
||||
import { MultiLineString } from 'ol/geom';
|
||||
import Point from 'ol/geom/Point';
|
||||
import { Group as LayerGroup } from 'ol/layer';
|
||||
import VectorLayer from 'ol/layer/Vector';
|
||||
import { fromLonLat } from 'ol/proj';
|
||||
import VectorSource from 'ol/source/Vector';
|
||||
import { Fill, Stroke, Style, Circle } from 'ol/style';
|
||||
import DayNight from 'ol-ext/source/DayNight';
|
||||
import { Subscription } from 'rxjs';
|
||||
|
||||
import {
|
||||
MapLayerRegistryItem,
|
||||
MapLayerOptions,
|
||||
@ -7,19 +20,6 @@ import {
|
||||
DataHoverEvent,
|
||||
DataHoverClearEvent,
|
||||
} from '@grafana/data';
|
||||
import Map from 'ol/Map';
|
||||
import VectorLayer from 'ol/layer/Vector';
|
||||
import VectorSource from 'ol/source/Vector';
|
||||
import { Fill, Stroke, Style, Circle } from 'ol/style';
|
||||
import { Group as LayerGroup } from 'ol/layer';
|
||||
import Feature from 'ol/Feature';
|
||||
import Point from 'ol/geom/Point';
|
||||
|
||||
import DayNight from 'ol-ext/source/DayNight';
|
||||
import { fromLonLat } from 'ol/proj';
|
||||
import { Subscription } from 'rxjs';
|
||||
import { MultiLineString } from 'ol/geom';
|
||||
import { Coordinate } from 'ol/coordinate';
|
||||
|
||||
export enum ShowTime {
|
||||
From = 'from',
|
||||
|
@ -1,3 +1,13 @@
|
||||
import { FeatureLike } from 'ol/Feature';
|
||||
import OlMap from 'ol/Map';
|
||||
import { unByKey } from 'ol/Observable';
|
||||
import GeoJSON from 'ol/format/GeoJSON';
|
||||
import VectorLayer from 'ol/layer/Vector';
|
||||
import VectorSource from 'ol/source/Vector';
|
||||
import { Fill, Stroke, Style } from 'ol/style';
|
||||
import { ReplaySubject } from 'rxjs';
|
||||
import { map as rxjsmap, first } from 'rxjs/operators';
|
||||
|
||||
import {
|
||||
MapLayerRegistryItem,
|
||||
MapLayerOptions,
|
||||
@ -6,25 +16,18 @@ import {
|
||||
PluginState,
|
||||
EventBus,
|
||||
} from '@grafana/data';
|
||||
import OlMap from 'ol/Map';
|
||||
import VectorLayer from 'ol/layer/Vector';
|
||||
import VectorSource from 'ol/source/Vector';
|
||||
import GeoJSON from 'ol/format/GeoJSON';
|
||||
import { unByKey } from 'ol/Observable';
|
||||
import { checkFeatureMatchesStyleRule } from '../../utils/checkFeatureMatchesStyleRule';
|
||||
import { FeatureRuleConfig, FeatureStyleConfig } from '../../types';
|
||||
import { Fill, Stroke, Style } from 'ol/style';
|
||||
import { FeatureLike } from 'ol/Feature';
|
||||
import { ComparisonOperation } from '@grafana/schema';
|
||||
import { findField } from 'app/features/dimensions';
|
||||
|
||||
import { StyleEditor } from '../../editor/StyleEditor';
|
||||
import { polyStyle } from '../../style/markers';
|
||||
import { defaultStyleConfig, StyleConfig, StyleConfigState } from '../../style/types';
|
||||
import { getStyleConfigState } from '../../style/utils';
|
||||
import { polyStyle } from '../../style/markers';
|
||||
import { StyleEditor } from '../../editor/StyleEditor';
|
||||
import { ReplaySubject } from 'rxjs';
|
||||
import { map as rxjsmap, first } from 'rxjs/operators';
|
||||
import { FeatureRuleConfig, FeatureStyleConfig } from '../../types';
|
||||
import { checkFeatureMatchesStyleRule } from '../../utils/checkFeatureMatchesStyleRule';
|
||||
import { getLayerPropertyInfo } from '../../utils/getFeatures';
|
||||
import { findField } from 'app/features/dimensions';
|
||||
import { getStyleDimension, getPublicGeoJSONFiles } from '../../utils/utils';
|
||||
import { ComparisonOperation } from '@grafana/schema';
|
||||
|
||||
|
||||
export interface DynamicGeoJSONMapperConfig {
|
||||
// URL for a geojson file
|
||||
@ -87,7 +90,7 @@ export const dynamicGeoJSONLayer: MapLayerRegistryItem<DynamicGeoJSONMapperConfi
|
||||
|
||||
const key = source.on('change', () => {
|
||||
//one geojson loads
|
||||
if (source.getState() == 'ready') {
|
||||
if (source.getState() === 'ready') {
|
||||
unByKey(key);
|
||||
features.next(source.getFeatures());
|
||||
}
|
||||
|
@ -1,3 +1,13 @@
|
||||
import { FeatureLike } from 'ol/Feature';
|
||||
import Map from 'ol/Map';
|
||||
import { unByKey } from 'ol/Observable';
|
||||
import GeoJSON from 'ol/format/GeoJSON';
|
||||
import VectorLayer from 'ol/layer/Vector';
|
||||
import VectorSource from 'ol/source/Vector';
|
||||
import { Style } from 'ol/style';
|
||||
import { ReplaySubject } from 'rxjs';
|
||||
import { map as rxjsmap, first } from 'rxjs/operators';
|
||||
|
||||
import {
|
||||
MapLayerRegistryItem,
|
||||
MapLayerOptions,
|
||||
@ -5,25 +15,18 @@ import {
|
||||
PluginState,
|
||||
EventBus,
|
||||
} from '@grafana/data';
|
||||
import Map from 'ol/Map';
|
||||
import VectorLayer from 'ol/layer/Vector';
|
||||
import VectorSource from 'ol/source/Vector';
|
||||
import GeoJSON from 'ol/format/GeoJSON';
|
||||
import { unByKey } from 'ol/Observable';
|
||||
import { checkFeatureMatchesStyleRule } from '../../utils/checkFeatureMatchesStyleRule';
|
||||
import { FeatureRuleConfig, FeatureStyleConfig } from '../../types';
|
||||
import { Style } from 'ol/style';
|
||||
import { FeatureLike } from 'ol/Feature';
|
||||
import { ComparisonOperation } from '@grafana/schema';
|
||||
|
||||
import { GeomapStyleRulesEditor } from '../../editor/GeomapStyleRulesEditor';
|
||||
import { StyleEditor } from '../../editor/StyleEditor';
|
||||
import { polyStyle } from '../../style/markers';
|
||||
import { defaultStyleConfig, StyleConfig, StyleConfigState } from '../../style/types';
|
||||
import { getStyleConfigState } from '../../style/utils';
|
||||
import { polyStyle } from '../../style/markers';
|
||||
import { StyleEditor } from '../../editor/StyleEditor';
|
||||
import { ReplaySubject } from 'rxjs';
|
||||
import { map as rxjsmap, first } from 'rxjs/operators';
|
||||
import { FeatureRuleConfig, FeatureStyleConfig } from '../../types';
|
||||
import { checkFeatureMatchesStyleRule } from '../../utils/checkFeatureMatchesStyleRule';
|
||||
import { getLayerPropertyInfo } from '../../utils/getFeatures';
|
||||
import { getPublicGeoJSONFiles } from '../../utils/utils';
|
||||
import { ComparisonOperation } from '@grafana/schema';
|
||||
|
||||
|
||||
export interface GeoJSONMapperConfig {
|
||||
// URL for a geojson file
|
||||
@ -81,7 +84,7 @@ export const geojsonLayer: MapLayerRegistryItem<GeoJSONMapperConfig> = {
|
||||
|
||||
const key = source.on('change', () => {
|
||||
//one geojson loads
|
||||
if (source.getState() == 'ready') {
|
||||
if (source.getState() === 'ready') {
|
||||
unByKey(key);
|
||||
features.next(source.getFeatures());
|
||||
}
|
||||
|
@ -1,3 +1,7 @@
|
||||
import Map from 'ol/Map';
|
||||
import { Point } from 'ol/geom';
|
||||
import * as layer from 'ol/layer';
|
||||
|
||||
import {
|
||||
EventBus,
|
||||
FieldType,
|
||||
@ -7,14 +11,11 @@ import {
|
||||
MapLayerRegistryItem,
|
||||
PanelData,
|
||||
} from '@grafana/data';
|
||||
import Map from 'ol/Map';
|
||||
import * as layer from 'ol/layer';
|
||||
import { getLocationMatchers } from 'app/features/geo/utils/location';
|
||||
import { ScaleDimensionConfig } from '@grafana/schema';
|
||||
import { getScaledDimension } from 'app/features/dimensions';
|
||||
import { ScaleDimensionEditor } from 'app/features/dimensions/editors';
|
||||
import { FrameVectorSource } from 'app/features/geo/utils/frameVectorSource';
|
||||
import { Point } from 'ol/geom';
|
||||
import { ScaleDimensionConfig } from '@grafana/schema';
|
||||
import { getLocationMatchers } from 'app/features/geo/utils/location';
|
||||
|
||||
// Configuration options for Heatmap overlays
|
||||
export interface HeatmapConfig {
|
||||
|
@ -1,11 +1,11 @@
|
||||
import { markersLayer } from './markersLayer';
|
||||
import { dayNightLayer } from './dayNightLayer';
|
||||
import { dynamicGeoJSONLayer } from './geojsonDynamic';
|
||||
import { geojsonLayer } from './geojsonLayer';
|
||||
import { heatmapLayer } from './heatMap';
|
||||
import { lastPointTracker } from './lastPointTracker';
|
||||
import { routeLayer } from './routeLayer';
|
||||
import { dayNightLayer } from './dayNightLayer';
|
||||
import { dynamicGeoJSONLayer } from './geojsonDynamic';
|
||||
import { markersLayer } from './markersLayer';
|
||||
import { photosLayer } from './photosLayer';
|
||||
import { routeLayer } from './routeLayer';
|
||||
|
||||
/**
|
||||
* Registry for layer handlers
|
||||
|
@ -1,9 +1,10 @@
|
||||
import { MapLayerRegistryItem, MapLayerOptions, PanelData, GrafanaTheme2, PluginState, EventBus } from '@grafana/data';
|
||||
import Map from 'ol/Map';
|
||||
import Feature from 'ol/Feature';
|
||||
import * as style from 'ol/style';
|
||||
import * as source from 'ol/source';
|
||||
import Map from 'ol/Map';
|
||||
import * as layer from 'ol/layer';
|
||||
import * as source from 'ol/source';
|
||||
import * as style from 'ol/style';
|
||||
|
||||
import { MapLayerRegistryItem, MapLayerOptions, PanelData, GrafanaTheme2, PluginState, EventBus } from '@grafana/data';
|
||||
import { getGeometryField, getLocationMatchers } from 'app/features/geo/utils/location';
|
||||
|
||||
export interface LastPointConfig {
|
||||
|
@ -1,4 +1,10 @@
|
||||
import { isNumber } from 'lodash';
|
||||
import { FeatureLike } from 'ol/Feature';
|
||||
import Map from 'ol/Map';
|
||||
import VectorLayer from 'ol/layer/Vector';
|
||||
import React, { ReactNode } from 'react';
|
||||
import { ReplaySubject } from 'rxjs';
|
||||
|
||||
import {
|
||||
MapLayerRegistryItem,
|
||||
MapLayerOptions,
|
||||
@ -7,18 +13,14 @@ import {
|
||||
FrameGeometrySourceMode,
|
||||
EventBus,
|
||||
} from '@grafana/data';
|
||||
import Map from 'ol/Map';
|
||||
import { FeatureLike } from 'ol/Feature';
|
||||
import { getLocationMatchers } from 'app/features/geo/utils/location';
|
||||
import { ObservablePropsWrapper } from '../../components/ObservablePropsWrapper';
|
||||
import { MarkersLegend, MarkersLegendProps } from '../../components/MarkersLegend';
|
||||
import { ReplaySubject } from 'rxjs';
|
||||
import { defaultStyleConfig, StyleConfig } from '../../style/types';
|
||||
import { StyleEditor } from '../../editor/StyleEditor';
|
||||
import { getStyleConfigState } from '../../style/utils';
|
||||
import VectorLayer from 'ol/layer/Vector';
|
||||
import { isNumber } from 'lodash';
|
||||
import { FrameVectorSource } from 'app/features/geo/utils/frameVectorSource';
|
||||
import { getLocationMatchers } from 'app/features/geo/utils/location';
|
||||
|
||||
import { MarkersLegend, MarkersLegendProps } from '../../components/MarkersLegend';
|
||||
import { ObservablePropsWrapper } from '../../components/ObservablePropsWrapper';
|
||||
import { StyleEditor } from '../../editor/StyleEditor';
|
||||
import { defaultStyleConfig, StyleConfig } from '../../style/types';
|
||||
import { getStyleConfigState } from '../../style/utils';
|
||||
import { getStyleDimension} from '../../utils/utils';
|
||||
|
||||
// Configuration options for Circle overlays
|
||||
|
@ -1,3 +1,9 @@
|
||||
import { FeatureLike } from 'ol/Feature';
|
||||
import Map from 'ol/Map';
|
||||
import VectorLayer from 'ol/layer/Vector';
|
||||
import { Stroke, Style } from 'ol/style';
|
||||
import Photo from 'ol-ext/style/Photo';
|
||||
|
||||
import {
|
||||
MapLayerRegistryItem,
|
||||
PanelData,
|
||||
@ -8,14 +14,9 @@ import {
|
||||
Field,
|
||||
} from '@grafana/data';
|
||||
import { FrameGeometrySourceMode, MapLayerOptions } from '@grafana/schema';
|
||||
import Map from 'ol/Map';
|
||||
import { FeatureLike } from 'ol/Feature';
|
||||
import { getLocationMatchers } from 'app/features/geo/utils/location';
|
||||
import VectorLayer from 'ol/layer/Vector';
|
||||
import { FrameVectorSource } from 'app/features/geo/utils/frameVectorSource';
|
||||
import { Stroke, Style } from 'ol/style';
|
||||
import Photo from 'ol-ext/style/Photo';
|
||||
import { findField } from 'app/features/dimensions';
|
||||
import { FrameVectorSource } from 'app/features/geo/utils/frameVectorSource';
|
||||
import { getLocationMatchers } from 'app/features/geo/utils/location';
|
||||
|
||||
// Configuration options for Circle overlays
|
||||
export interface PhotoConfig {
|
||||
@ -93,7 +94,7 @@ export const photosLayer: MapLayerRegistryItem<PhotoConfig> = {
|
||||
|
||||
vectorLayer.setStyle((feature: FeatureLike) => {
|
||||
let src = unknownImage;
|
||||
let idx: number = Infinity;
|
||||
let idx = Infinity;
|
||||
if (images.length > 0) {
|
||||
idx = feature.get('rowIndex') as number;
|
||||
src = images[idx] ?? unknownImage;
|
||||
|
@ -1,3 +1,15 @@
|
||||
import { isNumber } from 'lodash';
|
||||
import Feature, { FeatureLike } from 'ol/Feature';
|
||||
import Map from 'ol/Map';
|
||||
import { LineString, Point, SimpleGeometry } from 'ol/geom';
|
||||
import { Group as LayerGroup } from 'ol/layer';
|
||||
import VectorLayer from 'ol/layer/Vector';
|
||||
import VectorSource from 'ol/source/Vector';
|
||||
import { Fill, Stroke, Style, Circle } from 'ol/style';
|
||||
import FlowLine from 'ol-ext/style/FlowLine';
|
||||
import { Subscription, throttleTime } from 'rxjs';
|
||||
import tinycolor from 'tinycolor2';
|
||||
|
||||
import {
|
||||
MapLayerRegistryItem,
|
||||
PanelData,
|
||||
@ -9,28 +21,15 @@ import {
|
||||
DataFrame,
|
||||
TIME_SERIES_TIME_FIELD_NAME,
|
||||
} from '@grafana/data';
|
||||
|
||||
import { MapLayerOptions, FrameGeometrySourceMode } from '@grafana/schema';
|
||||
|
||||
import Map from 'ol/Map';
|
||||
import { FeatureLike } from 'ol/Feature';
|
||||
import { Subscription, throttleTime } from 'rxjs';
|
||||
import { getGeometryField, getLocationMatchers } from 'app/features/geo/utils/location';
|
||||
import { defaultStyleConfig, StyleConfig } from '../../style/types';
|
||||
import { StyleEditor } from '../../editor/StyleEditor';
|
||||
import { getStyleConfigState } from '../../style/utils';
|
||||
import VectorLayer from 'ol/layer/Vector';
|
||||
import { isNumber } from 'lodash';
|
||||
import { routeStyle } from '../../style/markers';
|
||||
import { FrameVectorSource } from 'app/features/geo/utils/frameVectorSource';
|
||||
import { Group as LayerGroup } from 'ol/layer';
|
||||
import VectorSource from 'ol/source/Vector';
|
||||
import { Fill, Stroke, Style, Circle } from 'ol/style';
|
||||
import Feature from 'ol/Feature';
|
||||
import { alpha } from '@grafana/data/src/themes/colorManipulator';
|
||||
import { LineString, Point, SimpleGeometry } from 'ol/geom';
|
||||
import FlowLine from 'ol-ext/style/FlowLine';
|
||||
import tinycolor from 'tinycolor2';
|
||||
import { MapLayerOptions, FrameGeometrySourceMode } from '@grafana/schema';
|
||||
import { FrameVectorSource } from 'app/features/geo/utils/frameVectorSource';
|
||||
import { getGeometryField, getLocationMatchers } from 'app/features/geo/utils/location';
|
||||
|
||||
import { StyleEditor } from '../../editor/StyleEditor';
|
||||
import { routeStyle } from '../../style/markers';
|
||||
import { defaultStyleConfig, StyleConfig } from '../../style/types';
|
||||
import { getStyleConfigState } from '../../style/utils';
|
||||
import { getStyleDimension, isSegmentVisible } from '../../utils/utils';
|
||||
|
||||
// Configuration options for Circle overlays
|
||||
@ -87,7 +86,7 @@ export const routeLayer: MapLayerRegistryItem<RouteConfig> = {
|
||||
const location = await getLocationMatchers(options.location);
|
||||
const source = new FrameVectorSource(location);
|
||||
const vectorLayer = new VectorLayer({ source });
|
||||
const hasArrows = config.arrow == 1 || config.arrow == -1;
|
||||
const hasArrows = config.arrow === 1 || config.arrow === -1;
|
||||
|
||||
if (!style.fields && !hasArrows) {
|
||||
// Set a global style
|
||||
@ -132,7 +131,7 @@ export const routeLayer: MapLayerRegistryItem<RouteConfig> = {
|
||||
|
||||
const flowStyle = new FlowLine({
|
||||
visible: true,
|
||||
lineCap: config.arrow == 0 ? 'round' : 'square',
|
||||
lineCap: config.arrow === 0 ? 'round' : 'square',
|
||||
color: color1,
|
||||
color2: color2,
|
||||
width: (dims.size && dims.size.get(startIndex)) ?? style.base.size,
|
||||
|
Loading…
Reference in New Issue
Block a user