mirror of
https://github.com/anyproto/anytype-ts.git
synced 2025-06-08 05:57:02 +09:00
JS-7062: fix
This commit is contained in:
parent
aac715bc08
commit
e632abc2eb
2 changed files with 16 additions and 15 deletions
|
@ -105,6 +105,7 @@ class WindowManager {
|
|||
if (!isChild) {
|
||||
try {
|
||||
state = windowStateKeeper({ defaultWidth: DEFAULT_WIDTH, defaultHeight: DEFAULT_HEIGHT });
|
||||
|
||||
param = Object.assign(param, {
|
||||
x: state.x,
|
||||
y: state.y,
|
||||
|
|
|
@ -346,10 +346,6 @@ const Vault = observer(forwardRef<VaultRefProps>((props, ref) => {
|
|||
onDragEnd={onSortEnd}
|
||||
modifiers={[ restrictToVerticalAxis, restrictToFirstScrollableAncestor ]}
|
||||
>
|
||||
<SortableContext
|
||||
items={items.map((item) => item.id)}
|
||||
strategy={verticalListSortingStrategy}
|
||||
>
|
||||
<div id="scroll" className="side top" onScroll={onScroll}>
|
||||
{itemsWithCounter.map((item, i) => (
|
||||
<VaultItem
|
||||
|
@ -364,18 +360,22 @@ const Vault = observer(forwardRef<VaultRefProps>((props, ref) => {
|
|||
|
||||
{itemsWithCounter.length > 0 ? <div className="div" /> : ''}
|
||||
|
||||
{itemsWithoutCounter.map((item, i) => (
|
||||
<VaultItem
|
||||
key={`item-space-${item.id}`}
|
||||
item={item}
|
||||
onClick={e => onClick(e, item)}
|
||||
onMouseEnter={e => onMouseEnter(e, item)}
|
||||
onMouseLeave={() => Preview.tooltipHide()}
|
||||
onContextMenu={item.isButton ? null : e => onContextMenu(e, item)}
|
||||
/>
|
||||
))}
|
||||
<SortableContext
|
||||
items={itemsWithoutCounter.map(item => item.id)}
|
||||
strategy={verticalListSortingStrategy}
|
||||
>
|
||||
{itemsWithoutCounter.map((item, i) => (
|
||||
<VaultItem
|
||||
key={`item-space-${item.id}`}
|
||||
item={item}
|
||||
onClick={e => onClick(e, item)}
|
||||
onMouseEnter={e => onMouseEnter(e, item)}
|
||||
onMouseLeave={() => Preview.tooltipHide()}
|
||||
onContextMenu={item.isButton ? null : e => onContextMenu(e, item)}
|
||||
/>
|
||||
))}
|
||||
</SortableContext>
|
||||
</div>
|
||||
</SortableContext>
|
||||
</DndContext>
|
||||
<div className="side bottom" onDragStart={e => e.preventDefault()}>
|
||||
{canCreate ? (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue