调整选色色轮居中放置。
This commit is contained in:
parent
fb5aec79d6
commit
c30148427b
|
@ -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;
|
||||||
|
|
|
@ -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}`}
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user