закрыл задачу 13
This commit is contained in:
@@ -12,6 +12,7 @@ import OSM from "ol/source/OSM";
|
||||
import VectorLayer from "ol/layer/Vector";
|
||||
import VectorSource, { VectorSourceEvent } from "ol/source/Vector";
|
||||
import Cluster from "ol/source/Cluster";
|
||||
|
||||
import {
|
||||
Draw,
|
||||
Modify,
|
||||
@@ -56,6 +57,10 @@ import Source from "ol/source/Source";
|
||||
import { FeatureLike } from "ol/Feature";
|
||||
import { createEmpty, extend, getCenter } from "ol/extent";
|
||||
|
||||
// Icons
|
||||
import EditIcon from './edit_icon.svg';
|
||||
import LineIcon from './line_icon.svg';
|
||||
|
||||
// --- CUSTOM SCROLLBAR STYLES ---
|
||||
const scrollbarStyles = `
|
||||
.scrollbar-hide {
|
||||
@@ -640,39 +645,6 @@ const saveActiveSection = (section: string | null): void => {
|
||||
}
|
||||
};
|
||||
|
||||
// --- SVG ICONS ---
|
||||
const EditIcon = () => (
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
className="h-4 w-4 mr-1 sm:mr-2"
|
||||
fill="none"
|
||||
viewBox="0 0 24 24"
|
||||
stroke="currentColor"
|
||||
>
|
||||
<path
|
||||
strokeLinecap="round"
|
||||
strokeLinejoin="round"
|
||||
strokeWidth={2}
|
||||
d="M15.232 5.232l3.536 3.536m-2.036-5.036a2.5 2.5 0 113.536 3.536L6.5 21.036H3v-3.572L16.732 3.732z"
|
||||
/>
|
||||
</svg>
|
||||
);
|
||||
const LineIconSvg = () => (
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
className="h-4 w-4 mr-1 sm:mr-2"
|
||||
fill="none"
|
||||
viewBox="0 0 24 24"
|
||||
stroke="currentColor"
|
||||
>
|
||||
<path
|
||||
strokeLinecap="round"
|
||||
strokeLinejoin="round"
|
||||
strokeWidth={2}
|
||||
d="M3.055 11H5a2 2 0 012 2v1a2 2 0 002 2h10a2 2 0 002-2v-1a2 2 0 012-2h1.945M7.732 4.064A2.5 2.5 0 105.23 6.24m13.54 0a2.5 2.5 0 10-2.502-2.176M12 16.05V21m0-17.948V3"
|
||||
/>
|
||||
</svg>
|
||||
);
|
||||
|
||||
// --- TYPE DEFINITIONS ---
|
||||
interface MapServiceConfig {
|
||||
@@ -2130,7 +2102,7 @@ const MapControls: React.FC<MapControlsProps> = ({
|
||||
mode: "edit",
|
||||
title: "Редактировать",
|
||||
longTitle: "Редактирование",
|
||||
icon: <EditIcon />,
|
||||
icon: <img src={EditIcon} alt="Редактировать" className="h-4 w-4 mr-1 sm:mr-2" />,
|
||||
action: () => mapService.activateEditMode(),
|
||||
},
|
||||
{
|
||||
@@ -2151,7 +2123,7 @@ const MapControls: React.FC<MapControlsProps> = ({
|
||||
mode: "drawing-route",
|
||||
title: "Маршрут",
|
||||
longTitle: "Добавить маршрут (Правый клик для завершения)",
|
||||
icon: <LineIconSvg />,
|
||||
icon: <img src={LineIcon} alt="Маршрут" className="h-4 w-4 mr-1 sm:mr-2" />,
|
||||
action: () => mapService.startDrawing("LineString", "route"),
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user