feat: update map, admin to and cache
This commit is contained in:
@@ -43,7 +43,7 @@ export const RouteListPage = observer(() => {
|
||||
loadCounts(routeIds);
|
||||
};
|
||||
fetchData();
|
||||
}, [language]);
|
||||
}, [language, selectedCityStore.cityVersion]);
|
||||
|
||||
const columns: GridColDef[] = [
|
||||
{
|
||||
|
||||
@@ -448,6 +448,22 @@ const StationLabel = observer(
|
||||
anchor={dynamicAnchor}
|
||||
zIndex={isHovered || isControlHovered ? 1000 : 0}
|
||||
>
|
||||
{ruLabelWidth > 0 && (
|
||||
<pixiGraphics
|
||||
draw={(g: Graphics) => {
|
||||
g.clear();
|
||||
const hasSecondLabel = !!(station.name && language !== "ru" && ruLabel);
|
||||
const pad = 10 / scale;
|
||||
const w = ruLabelWidth + pad * 2;
|
||||
const top = -compensatedRuFontSize / 2 - pad;
|
||||
const bottom = hasSecondLabel
|
||||
? compensatedRuFontSize * 1.1 + compensatedNameFontSize / 2 + pad
|
||||
: compensatedRuFontSize / 2 + pad;
|
||||
g.rect(-w / 2, top, w, bottom - top);
|
||||
g.fill({ color: 0x000000, alpha: 0.001 });
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
{ruLabel && (
|
||||
<pixiText
|
||||
ref={ruLabelRef}
|
||||
|
||||
@@ -52,7 +52,8 @@
|
||||
height: 96px;
|
||||
background-color: #fcd500;
|
||||
color: black;
|
||||
border-radius: 10px;
|
||||
border-top-left-radius: 10px;
|
||||
border-bottom-left-radius: 10px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
||||
@@ -2405,12 +2405,6 @@ export const WebGLRouteMapPrototype = observer(() => {
|
||||
resizingStationIconId === station.id;
|
||||
|
||||
const secondaryLineHeight = 1.2;
|
||||
const secondaryHeight = showSecondary
|
||||
? secondaryFontSize * secondaryLineHeight
|
||||
: 0;
|
||||
const menuPaddingTop = showSecondary
|
||||
? Math.max(0, secondaryHeight - secondaryMarginTop) + 3
|
||||
: 3;
|
||||
|
||||
return (
|
||||
<div key={station.id}>
|
||||
@@ -2440,22 +2434,25 @@ export const WebGLRouteMapPrototype = observer(() => {
|
||||
color: "#fff",
|
||||
fontFamily: "Roboto, sans-serif",
|
||||
textAlign: "left",
|
||||
pointerEvents: "auto",
|
||||
pointerEvents: "none",
|
||||
cursor: "grab",
|
||||
userSelect: "none",
|
||||
touchAction: "none",
|
||||
lineHeight: 1,
|
||||
}}
|
||||
>
|
||||
<div
|
||||
style={{
|
||||
pointerEvents: "auto",
|
||||
display: "inline-block",
|
||||
pointerEvents: "none",
|
||||
transformOrigin: "left center",
|
||||
transform: `rotate(${rotationCss})`,
|
||||
}}
|
||||
>
|
||||
<div
|
||||
style={{
|
||||
pointerEvents: "auto",
|
||||
display: "inline-block",
|
||||
pointerEvents: "none",
|
||||
transformOrigin: "left center",
|
||||
transform: `rotate(${counterRotationCss})`,
|
||||
}}
|
||||
@@ -2549,34 +2546,36 @@ export const WebGLRouteMapPrototype = observer(() => {
|
||||
) : null}
|
||||
<div
|
||||
style={{
|
||||
position: "relative",
|
||||
fontWeight: 700,
|
||||
fontSize: primaryFontSize,
|
||||
lineHeight: 1,
|
||||
textShadow: "0 0 4px rgba(0,0,0,0.6)",
|
||||
pointerEvents: "none",
|
||||
whiteSpace: "nowrap",
|
||||
}}
|
||||
>
|
||||
{station.name}
|
||||
{showSecondary ? (
|
||||
<div
|
||||
style={{
|
||||
position: "absolute",
|
||||
top: "100%",
|
||||
marginTop: -1 * secondaryMarginTop,
|
||||
fontWeight: 400,
|
||||
fontSize: secondaryFontSize,
|
||||
lineHeight: secondaryLineHeight,
|
||||
color: "#CBCBCB",
|
||||
textShadow: "0 0 3px rgba(0,0,0,0.4)",
|
||||
whiteSpace: "nowrap",
|
||||
...secondaryPositionStyle,
|
||||
pointerEvents: "none",
|
||||
}}
|
||||
>
|
||||
{secondaryStation?.name}
|
||||
</div>
|
||||
) : null}
|
||||
</div>
|
||||
{showSecondary ? (
|
||||
<div
|
||||
style={{
|
||||
position: "absolute",
|
||||
top: "100%",
|
||||
marginTop: -1 * secondaryMarginTop,
|
||||
fontWeight: 400,
|
||||
fontSize: secondaryFontSize,
|
||||
lineHeight: secondaryLineHeight,
|
||||
color: "#CBCBCB",
|
||||
textShadow: "0 0 3px rgba(0,0,0,0.4)",
|
||||
whiteSpace: "nowrap",
|
||||
...secondaryPositionStyle,
|
||||
pointerEvents: "none",
|
||||
}}
|
||||
>
|
||||
{secondaryStation?.name}
|
||||
</div>
|
||||
) : null}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -2587,9 +2586,9 @@ export const WebGLRouteMapPrototype = observer(() => {
|
||||
top: "100%",
|
||||
left: "50%",
|
||||
transform: "translateX(-50%)",
|
||||
paddingTop: menuPaddingTop,
|
||||
paddingTop: "8px",
|
||||
pointerEvents: "auto",
|
||||
zIndex: 10,
|
||||
zIndex: 1000000,
|
||||
cursor: "default",
|
||||
}}
|
||||
onPointerDown={(e) => e.stopPropagation()}
|
||||
|
||||
Reference in New Issue
Block a user