mirror of
https://github.com/muerwre/orchidmap-front.git
synced 2025-04-25 19:16:41 +07:00
updated aliases
This commit is contained in:
parent
af8d270460
commit
e950d98b73
74 changed files with 300 additions and 390 deletions
|
@ -1,8 +1,8 @@
|
|||
import axios from 'axios/index';
|
||||
import { API } from '$constants/api';
|
||||
import { IRootState, IRouteListItem } from '$redux/user';
|
||||
import { IUser } from '$constants/auth';
|
||||
import { CLIENT } from '$config/frontend';
|
||||
import { API } from '~/constants/api';
|
||||
import { IRootState, IRouteListItem } from '~/redux/user';
|
||||
import { IUser } from '~/constants/auth';
|
||||
import { CLIENT } from '~/config/frontend';
|
||||
import { LatLngLiteral } from 'leaflet';
|
||||
import {
|
||||
resultMiddleware,
|
||||
|
@ -10,7 +10,7 @@ import {
|
|||
IResultWithStatus,
|
||||
configWithToken,
|
||||
} from './middleware';
|
||||
import { IRoute } from '$redux/map/types';
|
||||
import { IRoute } from '~/redux/map/types';
|
||||
|
||||
const arrayToObject = (array: any[], key: string): {} =>
|
||||
array.reduce((obj, el) => ({ ...obj, [el[key]]: el }), {});
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { divIcon, LatLngLiteral, Marker, marker, DivIcon } from "leaflet";
|
||||
|
||||
const arrow_image = require('$sprites/arrow.svg');
|
||||
const arrow_image = require('~/sprites/arrow.svg');
|
||||
|
||||
// <use xlink:href="#path-arrow" transform="scale(2) translate(5 -2)"/>
|
||||
export const createArrow = (latlng: LatLngLiteral, angle: number): Marker => marker(latlng, {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { history } from '$redux/store';
|
||||
import {API_RETRY_INTERVAL} from "$constants/api";
|
||||
import { history } from '~/redux/store';
|
||||
import {API_RETRY_INTERVAL} from "~/constants/api";
|
||||
|
||||
interface IUrlData {
|
||||
path: string,
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
// import { editor } from '$modules/Editor';
|
||||
import { COLORS, CLIENT } from '$config/frontend';
|
||||
// import { editor } from '~/modules/Editor';
|
||||
import { COLORS, CLIENT } from '~/config/frontend';
|
||||
import saveAs from 'file-saver';
|
||||
import { replaceProviderUrl } from '$constants/providers';
|
||||
import { STICKERS } from '$constants/stickers';
|
||||
import { ILatLng, IRoute } from '$redux/map/types';
|
||||
import { IStickerDump } from '$redux/map/types';
|
||||
import { IRootState } from '$redux/user';
|
||||
import { replaceProviderUrl } from '~/constants/providers';
|
||||
import { STICKERS } from '~/constants/stickers';
|
||||
import { ILatLng, IRoute } from '~/redux/map/types';
|
||||
import { IStickerDump } from '~/redux/map/types';
|
||||
import { IRootState } from '~/redux/user';
|
||||
import {
|
||||
angleBetweenPoints,
|
||||
angleBetweenPointsRad,
|
||||
findDistancePx,
|
||||
middleCoordPx,
|
||||
} from '$utils/geom';
|
||||
} from '~/utils/geom';
|
||||
import { Point } from 'leaflet';
|
||||
import { MainMap } from '$containers/map/Map';
|
||||
import { MainMap } from '~/containers/map/Map';
|
||||
|
||||
export interface ITilePlacement {
|
||||
minX: number;
|
||||
|
@ -215,7 +215,7 @@ export const composeArrows = async ({
|
|||
points: Point[];
|
||||
ctx: CanvasRenderingContext2D;
|
||||
}): Promise<boolean[]> => {
|
||||
const image = await imageFetcher(require('$sprites/arrow.svg'));
|
||||
const image = await imageFetcher(require('~/sprites/arrow.svg'));
|
||||
|
||||
const distances = points.map(
|
||||
(point, i) => (points[i + 1] && findDistancePx(points[i], points[i + 1])) || 0
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { Map, LineUtil } from 'leaflet';
|
||||
import { ILatLng } from "$redux/map/types";
|
||||
import { ILatLng } from "~/redux/map/types";
|
||||
|
||||
export const simplify = ({ map, latlngs }: { map: Map, latlngs: ILatLng[] }): ILatLng[] => {
|
||||
const points = [];
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
import { MOBILE_BREAKPOINT } from '$config/frontend';
|
||||
import { MOBILE_BREAKPOINT } from '~/config/frontend';
|
||||
|
||||
export const isMobile = (): boolean => (window.innerWidth <= MOBILE_BREAKPOINT);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue