Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit 41f8139
Author: Joe Heffernan <[email protected]>
Date:   Mon Mar 18 19:45:23 2024 -0700

    feature/viewport button component (#478)

    * add viewport button component and organize dark theme colors

    * use antd tooltip placement prop type

commit 4796413
Author: ascibisz <[email protected]>
Date:   Mon Mar 18 11:21:32 2024 -0700

    0.11.0

commit e20842b
Author: Joe Heffernan <[email protected]>
Date:   Tue Mar 12 13:32:28 2024 -0700

     Fix/icomoon (#476)

    * new icon glyph set

    * apply icomoon icons with css vars and global styles

    * remove unused icons

    * remove icon declarations now in icomoon font

    * use var for star icon colors

    * new icomoon font set

commit 1980c09
Author: Megan Riel-Mehan <[email protected]>
Date:   Tue Mar 12 12:05:34 2024 -0700

    Feature/embed (#474)

    * fix the html loader result

    * add type

    * embed path

    * make sure the loading overlay shows

    * style title

    * remove extra color

    * remove log

    * remove unused code

commit 50a8c6f
Author: Joe Heffernan <[email protected]>
Date:   Tue Mar 12 10:43:06 2024 -0700

    fix: organize colors, modal buttons (#473)

    * organize and prune color variables and apply light theme at custom modal level

    * use var for disabled input text color

    * prevent flicker on select file button

    * remove classnames import from file upload modal

    * restore necessry whitespace in version modal text

    * position close x correctly in modal header

    * fix typo in focus selector

    * remove unneeded ant animation prop

commit a317426
Author: Joe Heffernan <[email protected]>
Date:   Mon Mar 11 11:51:56 2024 -0700

    reverse home page card order (#472)

commit bb038e1
Author: Megan Riel-Mehan <[email protected]>
Date:   Fri Mar 8 10:56:44 2024 -0800

    fix the html loader result (#475)

    * fix the html loader result

    * add type
  • Loading branch information
interim17 committed Mar 19, 2024
1 parent 96e31e9 commit 06a79cc
Show file tree
Hide file tree
Showing 12 changed files with 279 additions and 402 deletions.
28 changes: 28 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,36 @@ All notable changes to this project will be documented in this file. Dates are d

Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

#### [v0.11.0](https://github.com/simularium/simularium-website/compare/v0.10.0...v0.11.0)

- Fix/icomoon [`#476`](https://github.com/simularium/simularium-website/pull/476)
- Feature/embed [`#474`](https://github.com/simularium/simularium-website/pull/474)
- fix: organize colors, modal buttons [`#473`](https://github.com/simularium/simularium-website/pull/473)
- reverse home page card order [`#472`](https://github.com/simularium/simularium-website/pull/472)
- fix the html loader result [`#475`](https://github.com/simularium/simularium-website/pull/475)
- Feature/og tags [`#463`](https://github.com/simularium/simularium-website/pull/463)
- Fix/nav tooltips [`#469`](https://github.com/simularium/simularium-website/pull/469)
- Bump es5-ext from 0.10.62 to 0.10.64 [`#471`](https://github.com/simularium/simularium-website/pull/471)
- set slider range props to false and remove array from handler argument types [`#470`](https://github.com/simularium/simularium-website/pull/470)
- Fix/url modal [`#466`](https://github.com/simularium/simularium-website/pull/466)
- Fix/bump react [`#461`](https://github.com/simularium/simularium-website/pull/461)
- Bump follow-redirects from 1.15.2 to 1.15.4 [`#460`](https://github.com/simularium/simularium-website/pull/460)
- Bump plotly.js from 2.20.0 to 2.25.2 [`#457`](https://github.com/simularium/simularium-website/pull/457)
- open aics homepage in new tab [`#454`](https://github.com/simularium/simularium-website/pull/454)
- Feature/color picker [`#432`](https://github.com/simularium/simularium-website/pull/432)
- Bump @adobe/css-tools from 4.3.1 to 4.3.2 [`#449`](https://github.com/simularium/simularium-website/pull/449)
- Bump axios from 0.21.4 to 1.6.0 [`#447`](https://github.com/simularium/simularium-website/pull/447)
- check if it's a dependabot PR [`#450`](https://github.com/simularium/simularium-website/pull/450)
- Bump @babel/traverse from 7.20.5 to 7.23.2 [`#442`](https://github.com/simularium/simularium-website/pull/442)
- Fix/share download styling [`#448`](https://github.com/simularium/simularium-website/pull/448)
- add time estimate or size to PR template [`80017da`](https://github.com/simularium/simularium-website/commit/80017da8c44099cc5cb7b89538248e161a3ea060)
- Update test-coverage.yml [`37a5fee`](https://github.com/simularium/simularium-website/commit/37a5fee141d3b523fb6de69642c2119a84615558)
- Update test-coverage.yml [`f926754`](https://github.com/simularium/simularium-website/commit/f9267547f03c707b4cf3c91130658b78e35da67c)

#### [v0.10.0](https://github.com/simularium/simularium-website/compare/v0.9.0...v0.10.0)

> 23 October 2023
- update viewer and fix types [`#445`](https://github.com/simularium/simularium-website/pull/445)
- fix menus offsets [`#440`](https://github.com/simularium/simularium-website/pull/440)
- Feature/version info [`#423`](https://github.com/simularium/simularium-website/pull/423)
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "simularium-webapp",
"version": "0.10.0",
"version": "0.11.0",
"description": "",
"main": "src/index.tsx",
"repository": {
Expand Down
239 changes: 68 additions & 171 deletions src/components/CameraControls/index.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
import React, { useEffect, useState, useRef } from "react";
import { Button, Tooltip } from "antd";
import classNames from "classnames";
import { useHotkeys, useIsHotkeyPressed } from "react-hotkeys-hook";

import { TOOLTIP_COLOR } from "../../constants/index";
import { ZoomIn, ZoomOut } from "../Icons";
import ViewportButton from "../ViewportButton";

import styles from "./style.css";

Expand Down Expand Up @@ -143,178 +141,77 @@ const CameraControls = ({
}, [keyPressed]);
return (
<div className={styles.container}>
<div className={styles.zoomButtons}>
<Tooltip
placement="left"
title="Zoom in ( &uarr; )"
color={TOOLTIP_COLOR}
>
<Button
className={styles.btn}
icon={ZoomIn}
onClick={zoomIn}
/>
</Tooltip>
<Tooltip
placement="left"
title="Zoom out ( &darr; )"
color={TOOLTIP_COLOR}
>
<Button
className={styles.btn}
icon={ZoomOut}
onClick={zoomOut}
/>
</Tooltip>
</div>
<div className={styles.moveButtons}>
<div className={styles.radioGroup}>
<Tooltip
placement="left"
title={
mode === ROTATE ? "Rotate" : "Rotate (hold SHIFT)"
}
color={TOOLTIP_COLOR}
>
{/* Should be radio buttons, but using radio buttons
detaches keypressed listener after the button is pressed */}
<Button
className={classNames([
{ [styles.active]: mode === ROTATE },
styles.radioBtn,
])}
onClick={() => setMode(ROTATE)}
>
<span
className={classNames([
"icon-moon",
"anticon",
"rotate-icon",
])}
/>
</Button>
</Tooltip>
<Tooltip
placement="left"
title={mode === PAN ? "Pan" : "Pan (hold SHIFT)"}
color={TOOLTIP_COLOR}
>
<Button
className={classNames([
{ [styles.active]: mode === PAN },
styles.radioBtn,
])}
onClick={() => setMode(PAN)}
>
<span
className={classNames([
"icon-moon",
"anticon",
"pan-icon",
])}
/>
</Button>
</Tooltip>
</div>
<div className={styles.zoomGroup}>
<ViewportButton
tooltipText="Zoom in ( &uarr; )"
tooltipPlacement="left"
icon={ZoomIn}
clickHandler={zoomIn}
/>
<ViewportButton
tooltipText="Zoom out ( &darr; )"
tooltipPlacement="left"
icon={ZoomOut}
clickHandler={zoomOut}
/>
</div>
<div className={styles.moveButtons}>
<div className={styles.radioGroup}>
<Tooltip
placement="left"
title={"Orthographic Camera"}
color={TOOLTIP_COLOR}
>
{/* Should be radio buttons, but using radio buttons
detaches keypressed listener after the button is pressed */}
<Button
className={classNames([
{
[styles.active]:
cameraProjectionType === ORTHOGRAPHIC,
},
styles.radioBtn,
])}
onClick={() => {
setCameraProjectionType(ORTHOGRAPHIC);
}}
icon={
<span
className={classNames([
"icon-moon",
"anticon",
"orthographic-icon",
])}
/>
}
></Button>
</Tooltip>
<Tooltip
placement="left"
title={"Perspective Camera"}
color={TOOLTIP_COLOR}
>
<Button
className={classNames([
{
[styles.active]:
cameraProjectionType === PERSPECTIVE,
},
styles.radioBtn,
])}
onClick={() => {
setCameraProjectionType(PERSPECTIVE);
}}
icon={
<span
className={classNames([
"icon-moon",
"anticon",
"perspective-icon",
])}
/>
}
></Button>
</Tooltip>
</div>
<div className={styles.radioGroup}>
<ViewportButton
tooltipText={
mode === ROTATE ? "Rotate" : "Rotate (hold SHIFT)"
}
tooltipPlacement="left"
icon={"rotate-icon"}
radioGroupPosition={"top"}
clickHandler={() => setMode(ROTATE)}
active={mode === ROTATE}
/>
<ViewportButton
tooltipText={mode === PAN ? "Pan" : "Pan (hold SHIFT)"}
tooltipPlacement="left"
icon={"pan-icon"}
radioGroupPosition={"bottom"}
clickHandler={() => setMode(PAN)}
active={mode === PAN}
/>
</div>
<Tooltip placement="left" title="Focus (F)" color={TOOLTIP_COLOR}>
<Button
className={classNames([
{ [styles.active]: isFocused },
styles.radioBtn,
])}
onClick={() => {
saveFocusMode(!isFocused);
<ViewportButton
tooltipText={"Focus (F)"}
tooltipPlacement="left"
icon={"focus-icon"}
clickHandler={() => {
saveFocusMode(!isFocused);
}}
active={isFocused}
/>
<div className={styles.radioGroup}>
<ViewportButton
tooltipText={"Orthographic Camera"}
tooltipPlacement="left"
icon={"orthographic-icon"}
radioGroupPosition={"top"}
clickHandler={() => {
setCameraProjectionType(ORTHOGRAPHIC);
}}
>
<span
className={classNames([
"icon-moon",
"anticon",
"focus-icon",
])}
/>
</Button>
</Tooltip>
<Tooltip
placement="left"
title="Home view (H)"
color={TOOLTIP_COLOR}
>
<Button
className={styles.btn}
icon={
<span
className={classNames([
"icon-moon",
"anticon",
"reset-icon",
])}
/>
}
onClick={resetCamera}
active={cameraProjectionType === ORTHOGRAPHIC}
/>
</Tooltip>
<ViewportButton
tooltipText={"Perspective Camera"}
tooltipPlacement="left"
icon={"perspective-icon"}
radioGroupPosition={"bottom"}
clickHandler={() => {
setCameraProjectionType(PERSPECTIVE);
}}
active={cameraProjectionType === PERSPECTIVE}
/>
</div>
<ViewportButton
tooltipText={"Home view (H)"}
tooltipPlacement="left"
icon={"reset-icon"}
clickHandler={resetCamera}
/>
</div>
);
};
Expand Down
Loading

0 comments on commit 06a79cc

Please sign in to comment.