mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-09-26 02:40:07 +02:00
fix active styling
This commit is contained in:
@@ -53,7 +53,7 @@ export const ToolTypePopup = ({
|
|||||||
const panelWidth = panelRect?.width ?? 0;
|
const panelWidth = panelRect?.width ?? 0;
|
||||||
const panelHeight = panelRect?.height ?? 0;
|
const panelHeight = panelRect?.height ?? 0;
|
||||||
setPanelPosition({
|
setPanelPosition({
|
||||||
x: triggerRect.left - panelWidth / 2,
|
x: triggerRect.left - panelWidth / 2 + 4,
|
||||||
y: panelHeight + 8,
|
y: panelHeight + 8,
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@@ -93,15 +93,17 @@ export const ToolTypePopup = ({
|
|||||||
tabIndex={-1}
|
tabIndex={-1}
|
||||||
style={{
|
style={{
|
||||||
position: "fixed",
|
position: "fixed",
|
||||||
top: `${-10}px`,
|
top: `${-16}px`,
|
||||||
left: `${panelPosition.x}px`,
|
left: `${panelPosition.x}px`,
|
||||||
zIndex: 9999,
|
zIndex: "var(--zIndex-popup)",
|
||||||
}}
|
}}
|
||||||
className={CLASSES.CONVERT_ELEMENT_TYPE_POPUP}
|
className={CLASSES.CONVERT_ELEMENT_TYPE_POPUP}
|
||||||
>
|
>
|
||||||
{options.map(({ type, icon, title }) => (
|
{options.map(({ type, icon, title }) => (
|
||||||
<ToolButton
|
<ToolButton
|
||||||
className={className}
|
className={clsx(className, {
|
||||||
|
active: currentType === type,
|
||||||
|
})}
|
||||||
key={type}
|
key={type}
|
||||||
type="radio"
|
type="radio"
|
||||||
icon={icon}
|
icon={icon}
|
||||||
|
Reference in New Issue
Block a user