mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-04 09:28:11 +00:00
bug fix: selecting object in scene crashes (Headless UI Transition component bug)
This commit is contained in:
1 parent
f627da6d8f
commit
5ea90154b1
4 files changed
+7
-8
No files matched your search
@@ -120,7 +120,7 @@ export const PageEditor = () => {
|
||||
onClick={handleOverlayClick}
|
||||
>
|
||||
<div
|
||||
className="absolute bottom-0 mb-2 ml-2 flex origin-bottom-left flex-col gap-2"
|
||||
className="absolute bottom-0 mb-4 ml-4 flex origin-bottom-left flex-col gap-2"
|
||||
style={{ transform: `scale(${getScale()})` }}
|
||||
>
|
||||
<Outliner />
|
||||
|
||||
+4
-2
@@ -155,7 +155,7 @@ export const ControlPanelSceneObject = () => {
|
||||
updatedScaleValues.z = (parseFloat(localScale.z) + scale).toString();
|
||||
|
||||
handleScaleChange(updatedScaleValues);
|
||||
}
|
||||
};
|
||||
|
||||
const handleScaleChange = (xyz: Record<string, string>) => {
|
||||
if (isInvalid(xyz)) {
|
||||
@@ -180,9 +180,10 @@ export const ControlPanelSceneObject = () => {
|
||||
|
||||
return (
|
||||
<Transition
|
||||
as="div"
|
||||
show={isShowing.value}
|
||||
className={twMerge(
|
||||
"glass absolute bottom-0 right-0 mb-2 mr-2 flex h-fit w-56 origin-bottom-right flex-col gap-2 rounded-lg border border-ui-panel-border p-3.5 text-white shadow-lg",
|
||||
"glass absolute bottom-0 right-0 mb-4 mr-4 flex h-fit w-56 origin-bottom-right flex-col gap-2 rounded-lg border border-ui-panel-border p-3.5 text-white shadow-lg",
|
||||
)}
|
||||
enter="transition-opacity duration-150"
|
||||
enterFrom="opacity-0"
|
||||
@@ -208,6 +209,7 @@ export const ControlPanelSceneObject = () => {
|
||||
</div>
|
||||
|
||||
<Transition
|
||||
as="div"
|
||||
show={!isCollapsed}
|
||||
enter="transition-all duration-200 ease-in-out"
|
||||
enterFrom="opacity-0 max-h-0"
|
||||
|
||||
@@ -179,6 +179,7 @@ export const Outliner = () => {
|
||||
|
||||
return (
|
||||
<Transition
|
||||
as="div"
|
||||
show={outlinerIsShowing.value}
|
||||
className={twMerge(
|
||||
"glass flex max-h-[34vh] w-[240px] origin-bottom-left flex-col overflow-hidden rounded-lg shadow-lg",
|
||||
|
||||
@@ -2,11 +2,7 @@ import React from "react";
|
||||
import { useSignals } from "@preact/signals-react/runtime";
|
||||
import { poseMode, showPoseControls } from "../signals/selectedMode";
|
||||
import { Button, Tooltip } from "~/components";
|
||||
import {
|
||||
faCheck,
|
||||
faCheckDouble,
|
||||
faPersonRunning,
|
||||
} from "@fortawesome/pro-solid-svg-icons";
|
||||
import { faCheck, faPersonRunning } from "@fortawesome/pro-solid-svg-icons";
|
||||
|
||||
declare global {
|
||||
interface Window {
|
||||
|
||||
Reference in new issue
Block a user