Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add new interface #9

Open
wants to merge 41 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
16a3bc2
add new interface
GAGvozdik Jul 27, 2023
5972547
del common css
GAGvozdik Jul 27, 2023
aa1ce11
fix button css
GAGvozdik Jul 27, 2023
5cc0499
add Khokhlov-Gvozdik button
Aug 29, 2023
09e3df9
add Khokhlov-Gvozdik page
GAGvozdik Aug 29, 2023
a2882ec
add new styles on Khokhlov-Gvozdik page
GAGvozdik Aug 29, 2023
ae3888d
add modal window to Khohlov-Gvozdik page
Aug 30, 2023
d96027b
fix some styles, add css display grids
Aug 31, 2023
f760409
fix some styles on Khokhlov-Gvozdik page
GAGvozdik Sep 2, 2023
01cd8cd
add dark team
GAGvozdik Sep 3, 2023
ee860e5
add tooltips, load svg, fix some styles
GAGvozdik Sep 4, 2023
cea9a74
fix sphere rot, add simple grid
Sep 5, 2023
db11b04
I break all to fix centering break lambert projection too
GAGvozdik Sep 6, 2023
143dcf0
fix grid false rotate centering dont work because y axis directed down
GAGvozdik Sep 6, 2023
5935d0f
fix centering lets normalize all debug changings
GAGvozdik Sep 7, 2023
57187e5
fix lambert proj and centering return old styles
GAGvozdik Sep 9, 2023
0ec1e26
add rotate optimazer
GAGvozdik Sep 9, 2023
287cbdf
fix rotate optimazer
GAGvozdik Sep 9, 2023
12fac28
Провел начальный рефакторинг компонента ZoomedLambertGraph, оставил к…
I194 Sep 10, 2023
3176665
try to fix grid centering unsucess
Sep 12, 2023
71c7d8a
grid doesnt rotate((
GAGvozdik Sep 13, 2023
b79b4a3
fix centering
I194 Sep 13, 2023
264fe5c
fix create center zone and create degree grid, start to fix small cir…
Sep 13, 2023
b4f8fb7
fix create element and del unused props, change Khokhlov-Gvozdik to CAC
GAGvozdik Sep 14, 2023
8eab91f
try to add AxesAndData
GAGvozdik Sep 15, 2023
06271cc
fix centering bug with rotate around X
GAGvozdik Sep 17, 2023
10ab98b
merge with commit from main
GAGvozdik Sep 17, 2023
2227609
after merge in last commit appeared 2 or 3 mistakes with ways to fold…
GAGvozdik Sep 17, 2023
17d889b
Add Dot component, fix bug in svg download, fix Viewbox and dots size
GAGvozdik Sep 18, 2023
b98dfaf
Add degreeGreed component with only meridians
GAGvozdik Sep 23, 2023
c754e76
Add parallels in degreeGreed component
GAGvozdik Sep 23, 2023
3ca5deb
update package-lock
GAGvozdik Oct 30, 2023
4aea613
Fix GeoVdek, DekVgeo, degree grid, and spheral grid. Add select of qu…
GAGvozdik Nov 2, 2023
7a2e438
fix endless while bug in plot one arc in box. Change styles.css to sc…
GAGvozdik Nov 13, 2023
8564ebe
fix degree grid ticks and labels, add simple table
GAGvozdik Nov 18, 2023
d8ad36e
add demo result table
GAGvozdik Nov 20, 2023
1b9bc8e
fix south pole grid labels bug, divide debug panel and calculate butt…
GAGvozdik Nov 30, 2023
e5495f4
Merge branch 'main' into merging_with_main
GAGvozdik Mar 12, 2024
588d80c
Add tables and congige scss
GAGvozdik Mar 13, 2024
908dbf4
Connect dir selection func to calc result button
GAGvozdik Mar 13, 2024
261d36d
solve conflicts
Mar 13, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2,102 changes: 101 additions & 2,001 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,14 @@
"i18next-http-backend": "^1.4.4",
"import-js": "^5.0.0",
"numeric": "^1.2.6",
"or": "^0.2.0",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-draggable": "^4.4.4",
"react-dropzone": "^12.0.4",
"react-hook-form": "^7.30.0",
"react-i18next": "^11.18.6",
"react-icons": "^4.10.1",
"react-redux": "^7.2.6",
"react-responsive": "^9.0.0-beta.6",
"react-router-dom": "^6.2.1",
Expand Down
12 changes: 10 additions & 2 deletions src/App/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import styles from './App.module.scss';
import { Route, Routes } from 'react-router-dom';
import { useAppDispatch, useAppSelector } from '../services/store/hooks';
import { ThemeProvider, createTheme } from '@mui/material/styles';


import { MainPageLayout, AppLayout } from '../components/Layouts';
import { MainPage, DIRPage, PCAPage, NotFoundPage, WhyPMToolsPage, AuthorsAndHistory } from '../pages';
import { useSystemTheme } from '../utils/GlobalHooks';
Expand All @@ -11,17 +13,19 @@ import { setCurrentDIRid, setCurrentPMDid, setDirStatData, setTreatmentData } fr
import * as pcaPageReducer from '../services/reducers/pcaPage';
import * as dirPageReducer from '../services/reducers/dirPage';

import {Khokhlov_Gvozdik} from "../gag_components/khokhlov-gvozdik/khokhlov-gvozdik";

function App() {

const dispatch = useAppDispatch();

const { colorMode, rememberColorMode } = useAppSelector(state => state.appSettingsReducer);
const systemTheme = useSystemTheme();

// useEffect(() => {
// if (!rememberColorMode) dispatch(setColorMode(systemTheme));
// }, [systemTheme, rememberColorMode]);

useEffect(() => {
console.log('color', localStorage)
const previousColorMode = localStorage.getItem('colorMode') || systemTheme;
Expand Down Expand Up @@ -131,11 +135,15 @@ function App() {
<Route path='/app' element={<AppLayout />}>
<Route path='pca' element={<PCAPage />}/>
<Route path='dir' element={<DIRPage />}/>
<Route path='Khokhlov_Gvozdik' element={<Khokhlov_Gvozdik />}/>
</Route>
<Route path='*' element={<NotFoundPage />}/>
</Routes>

</ThemeProvider>

</Suspense>

);
}

Expand Down
56 changes: 56 additions & 0 deletions src/components/AppGraphs/HGGraph/HGGraph.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
import React, { FC, useMemo } from "react";
import styles from "./MagGraph.module.scss";
import { useGraphSelectableNodesPCA, useGraphSelectedIDs, usePMDGraphSettings } from "../../../utils/GlobalHooks";
import { IDirData, IGraph } from "../../../utils/GlobalTypes";
import { IPmdData } from "../../../utils/GlobalTypes";
import dataToMag from "../../../utils/graphs/formatters/mag/dataToMag";
import { SelectableGraph } from "../../Common/Graphs";
import getInterpretationIDs from "../../../utils/graphs/formatters/getInterpretationIDs";
import { useAppSelector } from "../../../services/store/hooks";
import { GraphSettings, TMenuItem } from "../../../utils/graphs/types";

export interface IHGGraph extends IGraph {
data: IDirData;
menuSettings: {
menuItems: TMenuItem[];
settings: GraphSettings;
}
}

const HGGraph = ({ graphId, width, height, data, menuSettings }: IHGGraph) => {

return (
<>
{/* <SelectableGraph
graphId={graphId}
width={viewWidth}
height={viewHeight}
selectableNodes={[]}
nodesDuplicated={false}
menuItems={[]}
extraID={data.metadata.name}
graphName={`${data.metadata.name}_hg_zoomed`}
>
<g>
<Zoomed_lambert_graph
center_zone={center_zone}
dir_list={dir_list}
angle_list={angle_list}
grid_points={grid_points}
points_numb={points_numb}
sred_dir={sred_dir}
alpha95={alpha95}
isvis={isvis}
isvisgrid={isvisgrid}
grid_color={grid_color}
poly_color={poly_color}
degree_grid_isvis={degree_grid_isvis}
rumbs_isvis={rumbs_isvis}
/>
</g>
</SelectableGraph> */}
</>
)
}

export default HGGraph;
2 changes: 1 addition & 1 deletion src/components/AppGraphs/StereoGraphDIR/AxesAndData.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { graphSelectedDotColor } from "../../../utils/ThemeConstants";
import { Axis, Data, Dot } from "../../Common/Graphs";

interface IAxesAndData {
graphId: string;
graphId: string;
width: number;
height: number;
areaConstants: {
Expand Down
7 changes: 7 additions & 0 deletions src/components/AppLogic/AppNavigation/AppNavigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import OtherHousesIcon from '@mui/icons-material/OtherHouses';
import { DefaultIconButton } from "../../Common/Buttons";
import { useTranslation } from "react-i18next";
import { Menu, MenuItem } from "@mui/material";
import {Khokhlov_Gvozdik} from "../../../gag_components/khokhlov-gvozdik/khokhlov-gvozdik";

const AppNavigation: FC = ({}) => {

Expand Down Expand Up @@ -56,6 +57,12 @@ const AppNavigation: FC = ({}) => {
icon={'DIR'}
to={'/app/dir'}
/>
<NavButton
label={t('')}
icon={'CAC'}
to={'Khokhlov_Gvozdik'}
/>

<NavButton
label={t('appLayout.navPanel.projectRepo')}
icon={<GitHubIcon />}
Expand Down
14 changes: 9 additions & 5 deletions src/components/Common/Graphs/Dot/Dot.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ interface IDot {
* @param highlightStatistics Whether to render orange highlights
* @param showGC Whether to render great circles for dirs with 'gc' or 'gcn' code
*/
settings: DotSettings;
settings?: DotSettings;
}

/**
Expand Down Expand Up @@ -153,7 +153,11 @@ const Dot: FC<IDot> = ({
<g>
{
[
<<<<<<< HEAD
settings && (((showText || selected) && settings.annotations) &&
=======
(settings.annotations) &&
>>>>>>> upstream/main
<text
id={`${id}__annotation`}
x={x}
Expand Down Expand Up @@ -188,7 +192,7 @@ const Dot: FC<IDot> = ({
<line x1={x} x2={x} y1={y - 8} y2={y + 8} stroke={graphSelectedDotColor(type)}/>
</g>,

confidenceCircle && settings.confidenceCircle &&
settings && (confidenceCircle && settings.confidenceCircle &&
[
<path
d={createStraightPath(confidenceCircle.xyDataSplitted.neg)}
Expand Down Expand Up @@ -249,8 +253,8 @@ const Dot: FC<IDot> = ({
strokeLinecap="round"
fillOpacity="0"
/>
]
]
])
)]
}
{/* <circle
cx={x}
Expand Down Expand Up @@ -278,7 +282,7 @@ const Dot: FC<IDot> = ({
onMouseOut={() => handleOut(id)}
/>
{
tooltipData && settings.tooltips &&
settings && tooltipData && settings.tooltips &&
<Tooltip
position={tooltipData.position}
isVisible={tooltipData.isVisible}
Expand Down
Empty file.
Loading