Browse Source

Merge pull request #5667 from vvlladd28/map/fixed/enable-polygon-edit

[3.3.3] UI: Fixed incorrect disable polygon-editor in trip animation widgets
pull/5744/head
Igor Kulikov 5 years ago
committed by GitHub
parent
commit
43bfa73b7d
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      ui-ngx/src/app/modules/home/components/widget/trip-animation/trip-animation.component.ts

4
ui-ngx/src/app/modules/home/components/widget/trip-animation/trip-animation.component.ts

@ -49,7 +49,7 @@ import {
} from '@home/components/widget/lib/maps/common-maps-utils'; } from '@home/components/widget/lib/maps/common-maps-utils';
import { JsonSettingsSchema, WidgetConfig } from '@shared/models/widget.models'; import { JsonSettingsSchema, WidgetConfig } from '@shared/models/widget.models';
import moment from 'moment'; import moment from 'moment';
import { isDefined, isUndefined } from '@core/utils'; import { deepClone, isDefined, isUndefined } from '@core/utils';
import { ResizeObserver } from '@juggle/resize-observer'; import { ResizeObserver } from '@juggle/resize-observer';
import { MapWidgetInterface } from '@home/components/widget/lib/maps/map-widget.interface'; import { MapWidgetInterface } from '@home/components/widget/lib/maps/map-widget.interface';
@ -100,7 +100,7 @@ export class TripAnimationComponent implements OnInit, AfterViewInit, OnDestroy
addGroupInfo(schema, 'Path Settings'); addGroupInfo(schema, 'Path Settings');
addToSchema(schema, addCondition(pointSchema, 'model.showPoints === true', ['showPoints'])); addToSchema(schema, addCondition(pointSchema, 'model.showPoints === true', ['showPoints']));
addGroupInfo(schema, 'Path Points Settings'); addGroupInfo(schema, 'Path Points Settings');
const mapPolygonSchemaWithoutEdit = mapPolygonSchema; const mapPolygonSchemaWithoutEdit = deepClone(mapPolygonSchema);
delete mapPolygonSchemaWithoutEdit.schema.properties.editablePolygon; delete mapPolygonSchemaWithoutEdit.schema.properties.editablePolygon;
mapPolygonSchemaWithoutEdit.form.splice(mapPolygonSchemaWithoutEdit.form.indexOf('editablePolygon'), 1); mapPolygonSchemaWithoutEdit.form.splice(mapPolygonSchemaWithoutEdit.form.indexOf('editablePolygon'), 1);
addToSchema(schema, addCondition(mapPolygonSchemaWithoutEdit, 'model.showPolygon === true', ['showPolygon'])); addToSchema(schema, addCondition(mapPolygonSchemaWithoutEdit, 'model.showPolygon === true', ['showPolygon']));

Loading…
Cancel
Save