mirror of
https://github.com/IRBorisov/ConceptPortal.git
synced 2025-08-14 04:40:36 +03:00
B: Small UI fixes
This commit is contained in:
parent
62678b8b59
commit
7eb7fb09cf
|
@ -31,7 +31,7 @@ interface ToolbarGraphSelectionProps extends Styling {
|
||||||
export function ToolbarGraphSelection({
|
export function ToolbarGraphSelection({
|
||||||
className,
|
className,
|
||||||
graph,
|
graph,
|
||||||
value: selected,
|
value,
|
||||||
isCore,
|
isCore,
|
||||||
isInherited,
|
isInherited,
|
||||||
isCrucial,
|
isCrucial,
|
||||||
|
@ -40,7 +40,7 @@ export function ToolbarGraphSelection({
|
||||||
}: ToolbarGraphSelectionProps) {
|
}: ToolbarGraphSelectionProps) {
|
||||||
const selectedMenu = useDropdown();
|
const selectedMenu = useDropdown();
|
||||||
const groupMenu = useDropdown();
|
const groupMenu = useDropdown();
|
||||||
const emptySelection = selected.length === 0;
|
const emptySelection = value.length === 0;
|
||||||
|
|
||||||
function handleSelectReset() {
|
function handleSelectReset() {
|
||||||
onChange([]);
|
onChange([]);
|
||||||
|
@ -68,31 +68,31 @@ export function ToolbarGraphSelection({
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleExpandOutputs() {
|
function handleExpandOutputs() {
|
||||||
onChange([...selected, ...graph.expandOutputs(selected)]);
|
onChange([...value, ...graph.expandOutputs(value)]);
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleExpandInputs() {
|
function handleExpandInputs() {
|
||||||
onChange([...selected, ...graph.expandInputs(selected)]);
|
onChange([...value, ...graph.expandInputs(value)]);
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleSelectMaximize() {
|
function handleSelectMaximize() {
|
||||||
selectedMenu.hide();
|
selectedMenu.hide();
|
||||||
onChange(graph.maximizePart(selected));
|
onChange(graph.maximizePart(value));
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleSelectInvert() {
|
function handleSelectInvert() {
|
||||||
selectedMenu.hide();
|
selectedMenu.hide();
|
||||||
onChange([...graph.nodes.keys()].filter(item => !selected.includes(item)));
|
onChange([...graph.nodes.keys()].filter(item => !value.includes(item)));
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleSelectAllInputs() {
|
function handleSelectAllInputs() {
|
||||||
selectedMenu.hide();
|
selectedMenu.hide();
|
||||||
onChange([...graph.expandInputs(selected)]);
|
onChange([...value, ...graph.expandInputs(value)]);
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleSelectAllOutputs() {
|
function handleSelectAllOutputs() {
|
||||||
selectedMenu.hide();
|
selectedMenu.hide();
|
||||||
onChange([...graph.expandOutputs(selected)]);
|
onChange([...value, ...graph.expandOutputs(value)]);
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -166,7 +166,7 @@ export function ToolbarGraphSelection({
|
||||||
icon={<IconGroupSelection size='1.25rem' className='icon-primary' />}
|
icon={<IconGroupSelection size='1.25rem' className='icon-primary' />}
|
||||||
onClick={groupMenu.toggle}
|
onClick={groupMenu.toggle}
|
||||||
/>
|
/>
|
||||||
<Dropdown isOpen={groupMenu.isOpen} className='-translate-x-1/2'>
|
<Dropdown isOpen={groupMenu.isOpen} stretchLeft>
|
||||||
<DropdownButton
|
<DropdownButton
|
||||||
text='ядро'
|
text='ядро'
|
||||||
title='Выделить ядро'
|
title='Выделить ядро'
|
||||||
|
|
|
@ -33,10 +33,9 @@ export function ViewConstituents({
|
||||||
autoScroll
|
autoScroll
|
||||||
}: ViewConstituentsProps) {
|
}: ViewConstituentsProps) {
|
||||||
return (
|
return (
|
||||||
<aside className={cn(!noBorder && 'border', className)}>
|
<div className={cn(!noBorder && 'border', className)}>
|
||||||
<ConstituentsSearch
|
<ConstituentsSearch
|
||||||
schema={schema} //
|
dense={dense} //
|
||||||
dense={dense}
|
|
||||||
hideGraphFilter={!activeCst}
|
hideGraphFilter={!activeCst}
|
||||||
/>
|
/>
|
||||||
<TableSideConstituents
|
<TableSideConstituents
|
||||||
|
@ -47,6 +46,6 @@ export function ViewConstituents({
|
||||||
autoScroll={autoScroll}
|
autoScroll={autoScroll}
|
||||||
onDoubleClick={onDoubleClick}
|
onDoubleClick={onDoubleClick}
|
||||||
/>
|
/>
|
||||||
</aside>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,6 +36,7 @@ export function DlgEditCst() {
|
||||||
target: target.id,
|
target: target.id,
|
||||||
item_data: {
|
item_data: {
|
||||||
alias: target.alias,
|
alias: target.alias,
|
||||||
|
crucial: target.crucial,
|
||||||
cst_type: target.cst_type,
|
cst_type: target.cst_type,
|
||||||
convention: target.convention,
|
convention: target.convention,
|
||||||
definition_formal: target.definition_formal,
|
definition_formal: target.definition_formal,
|
||||||
|
|
|
@ -122,7 +122,7 @@ export function EditorConstituenta() {
|
||||||
</div>
|
</div>
|
||||||
<ViewConstituents
|
<ViewConstituents
|
||||||
className={clsx(
|
className={clsx(
|
||||||
'cc-animate-sidebar',
|
'cc-animate-sidebar min-h-55',
|
||||||
isNarrow ? 'mt-3 mx-6 rounded-md overflow-hidden' : 'mt-9 rounded-l-md rounded-r-none overflow-visible',
|
isNarrow ? 'mt-3 mx-6 rounded-md overflow-hidden' : 'mt-9 rounded-l-md rounded-r-none overflow-visible',
|
||||||
showList ? 'max-w-full' : 'opacity-0 max-w-0'
|
showList ? 'max-w-full' : 'opacity-0 max-w-0'
|
||||||
)}
|
)}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user