Add some styles

dev
Platon Yasev 3 years ago
parent c1ad741ae0
commit 00f21ffcd9

@ -31,7 +31,6 @@ export const Points = ({ rate: rateRange }) => {
];
}
console.log(result);
return result;
}, [rate, rateRange, activeTypes]);

@ -66,7 +66,7 @@ export const MapPopup = ({ feature, lat, lng, onClose }) => {
onClose={onClose}
closeOnClick={false}
>
<div className={`min-w-[${layout.width}px]`}>
<div className={`!min-w-[${layout.width}px]`}>
{config.map((item) => {
const value = item.field
? feature.properties[item.field]

@ -66,3 +66,26 @@
border-radius: 5px;
width: 100% !important;
}
/* Works on Firefox*/
* {
scrollbar-width: thin;
scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}
/* Works on Chrome and Safari */
*::-webkit-scrollbar {
@apply h-[2px] w-[4px];
}
*::-webkit-scrollbar-thumb {
@apply rounded-xl border border-solid border-transparent bg-grey-light;
}
*::-webkit-scrollbar-track {
@apply rounded-xl bg-transparent;
}
*::-webkit-scrollbar-corner {
@apply hidden;
}

@ -11,7 +11,7 @@ const types = [
export function Legend() {
return (
<div className="absolute bottom-[20px] left-[20px] bg-white-background w-[250px] rounded-xl p-4 text-xs text-grey">
<div className="absolute bottom-[20px] left-[20px] bg-white-background w-[250px] rounded-xl p-4 text-xs text-grey z-10">
<Title text={"Тип объекта размещения"} className={"mb-1"} />
<div className="space-y-2">
{types.map((type) => (

@ -1,5 +1,4 @@
import { SliderComponent as Slider } from "../../components/SliderComponent";
import { Button } from "antd";
import { useFactors } from "../../stores/useFactors";
import { factorsNameMapper } from "../../config";
@ -24,11 +23,6 @@ export const Settings = () => {
/>
);
})}
<div>
<Button type="primary" block className={"mt-2"}>
Рассчитать
</Button>
</div>
</div>
);
};

@ -8,9 +8,82 @@ import { GridSizeSelect } from "./GridSizeSelect";
import { ModelSelect } from "./ModelSelect";
import { Settings } from "./Settings";
// const activeTablesMapper = {
// net_3: ["point3", "net_3"],
// net_4: ["point4", "net_4"],
// net_5: ["point5", "net_5"],
// };
// function download(filename, data) {
// const link = document.createElement("a");
// link.href =
// "data:application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;base64," +
// encodeURIComponent(data);
// link.setAttribute("download", filename);
//
// link.style.display = "none";
// document.body.appendChild(link);
//
// link.click();
//
// document.body.removeChild(link);
// }
// const getRegionParam = (regionId) => {
// if (!regionId) return null;
//
// const [type, id] = regionId.split("-");
//
// if (type === "ao") {
// return { msk_ao: Number(id) };
// }
//
// return { msk_rayon: Number(id) };
// };
export const Sidebar = () => {
// const { factors } = useFactors();
// const { activeTypes } = useActiveTypes();
// const { region } = useRegion();
// const { gridSize } = useGridSize();
//
// const handleExport = async () => {
// const params = {
// koefs: factors,
// tables: activeTablesMapper[gridSize],
// };
//
// if (region) {
// params.filters = {
// ...params.filters,
// ...getRegionParam(region),
// };
// }
//
// if (activeTypes.length) {
// params.filters = {
// ...params.filters,
// category: activeTypes,
// };
// }
//
// const resp = await api.post("/api/raschet/", params);
// const blob = resp.data;
//
// const downloadLink = window.document.createElement("a");
// downloadLink.href = window.URL.createObjectURL(
// new Blob([blob], {
// type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
// })
// );
// downloadLink.download = "postamates.xlsx";
// document.body.appendChild(downloadLink);
// downloadLink.click();
// document.body.removeChild(downloadLink);
// };
return (
<div className="absolute top-[20px] right-[20px] bg-white-background w-[300px] rounded-xl p-3 max-h-[calc(100vh-30px)] overflow-y-auto">
<div className="absolute top-[20px] right-[20px] bg-white-background w-[300px] rounded-xl p-3 max-h-[calc(100vh-40px)] overflow-y-auto z-10">
<Popover
placement="leftTop"
title={"Веса факторов"}

Loading…
Cancel
Save