mirror of
https://github.com/utopia-os/utopia-ui.git
synced 2026-04-06 01:25:33 +00:00
fix: reset position for new items without text
This commit is contained in:
parent
40a88c68fa
commit
8a0cd2a07b
@ -20,7 +20,7 @@ export const SelectPosition = ({
|
|||||||
</label>
|
</label>
|
||||||
<div className='tw:alert tw:bg-base-100 tw:text-base-content'>
|
<div className='tw:alert tw:bg-base-100 tw:text-base-content'>
|
||||||
<div>
|
<div>
|
||||||
{selectNewItemPosition && 'text' in selectNewItemPosition && (
|
{selectNewItemPosition && 'layer' in selectNewItemPosition && (
|
||||||
<span className='tw:text-lg'>
|
<span className='tw:text-lg'>
|
||||||
Select new position of <b>{selectNewItemPosition.name}</b> on the map!
|
Select new position of <b>{selectNewItemPosition.name}</b> on the map!
|
||||||
</span>
|
</span>
|
||||||
|
|||||||
@ -69,7 +69,7 @@ function useSelectPositionManager(): {
|
|||||||
})
|
})
|
||||||
setSelectPosition(null)
|
setSelectPosition(null)
|
||||||
}
|
}
|
||||||
if ('text' in selectPosition) {
|
if ('layer' in selectPosition) {
|
||||||
// if selectPosition is an Item
|
// if selectPosition is an Item
|
||||||
const position =
|
const position =
|
||||||
mapClicked?.position.lng &&
|
mapClicked?.position.lng &&
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user