调整选色色轮居中放置。

This commit is contained in:
徐涛 2025-01-06 09:47:03 +08:00
parent fb5aec79d6
commit c30148427b
4 changed files with 7 additions and 4 deletions

View File

@ -14,10 +14,10 @@
clip-path: polygon(23.21% 0%, 50% 100%, 76.79% 0%); clip-path: polygon(23.21% 0%, 50% 100%, 76.79% 0%);
position: absolute; position: absolute;
top: 0; top: 0;
left: 0; left: 50%;
width: 15rem; width: 15rem;
aspect-ratio: 1 / 1; aspect-ratio: 1 / 1;
transform-origin: center bottom; transform-origin: 0 bottom;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: center; justify-content: center;

View File

@ -42,7 +42,9 @@ export function ColorColumn({ actived, rotate, rootColor }: ColorWheelProps) {
}, [rootColor]); }, [rootColor]);
return ( return (
<div className={styles.color_column} style={{ transform: `rotate(${rotate}deg)` }}> <div
className={styles.color_column}
style={{ transform: `rotate(${rotate}deg) translateX(-50%)` }}>
{colorSeries.map((c, index) => ( {colorSeries.map((c, index) => (
<ColorBlock <ColorBlock
key={`${c}-${index}`} key={`${c}-${index}`}

View File

@ -50,7 +50,7 @@ export function ColorWheel({
return ( return (
<div className={styles.wheel_view}> <div className={styles.wheel_view}>
<h5>Color Wheel</h5> <h5>Color Wheel</h5>
<div className={cx('center', styles.wheel_place)}> <div className={cx(styles.wheel_place)}>
<div className={styles.wheel_container}> <div className={styles.wheel_container}>
{wheelColors.map(({ color, rotate }) => ( {wheelColors.map(({ color, rotate }) => (
<ColorColumn <ColorColumn

View File

@ -9,6 +9,7 @@
flex-direction: row; flex-direction: row;
align-items: stretch; align-items: stretch;
gap: var(--spacing-m); gap: var(--spacing-m);
overflow-y: auto;
} }
.function_side { .function_side {
display: flex; display: flex;