Change default sort direction

Fix fitBounds
This commit is contained in:
Vladyslav_Prykhodko 2020-05-22 15:08:00 +03:00
parent c7ec88cc13
commit cc1f838d5d
2 changed files with 8 additions and 7 deletions

View File

@ -20,12 +20,12 @@ import 'leaflet-providers';
import 'leaflet.markercluster/dist/leaflet.markercluster'; import 'leaflet.markercluster/dist/leaflet.markercluster';
import { import {
FormattedData, FormattedData,
MapSettings, MapSettings,
MarkerSettings, MarkerSettings,
PolygonSettings, PolygonSettings,
PolylineSettings, PolylineSettings,
UnitedMapSettings UnitedMapSettings
} from './map-models'; } from './map-models';
import { Marker } from './markers'; import { Marker } from './markers';
import { BehaviorSubject, Observable } from 'rxjs'; import { BehaviorSubject, Observable } from 'rxjs';
@ -222,6 +222,7 @@ export default abstract class LeafletMap {
this.bounds = this.bounds.extend(this.options.defaultCenterPosition); this.bounds = this.bounds.extend(this.options.defaultCenterPosition);
} }
this.map.fitBounds(this.bounds, { padding: padding || [50, 50], animate: false }); this.map.fitBounds(this.bounds, { padding: padding || [50, 50], animate: false });
this.map.invalidateSize();
} }
} }
} }

View File

@ -149,7 +149,7 @@ export class EntityTableConfig<T extends BaseData<HasId>, P extends PageLink = P
entityComponent: Type<EntityComponent<T, P, L>>; entityComponent: Type<EntityComponent<T, P, L>>;
entityTabsComponent: Type<EntityTabsComponent<T, P, L>>; entityTabsComponent: Type<EntityTabsComponent<T, P, L>>;
addDialogStyle = {}; addDialogStyle = {};
defaultSortOrder: SortOrder = {property: 'createdTime', direction: Direction.ASC}; defaultSortOrder: SortOrder = {property: 'createdTime', direction: Direction.DESC};
displayPagination = true; displayPagination = true;
defaultPageSize = 10; defaultPageSize = 10;
columns: Array<EntityColumn<L>> = []; columns: Array<EntityColumn<L>> = [];