minor app improvements
This commit is contained in:
@@ -135,6 +135,7 @@
|
||||
<div class="text-red-500 text-xs">{errorsMessage}</div>
|
||||
{/if}
|
||||
<Button
|
||||
on:pointerdown={(e) => e.stopPropagation()}
|
||||
btnClasses={twMerge(
|
||||
$app.css?.['buttoncomponent']?.['button']?.class,
|
||||
customCss?.button?.class,
|
||||
|
||||
@@ -28,9 +28,10 @@
|
||||
|
||||
{#if selected || hover}
|
||||
<span
|
||||
draggable="false"
|
||||
title={`Id: ${component.id}`}
|
||||
class={twMerge(
|
||||
'px-2 text-2xs font-semibold w-fit absolute shadow -top-[9px] -left-[8px] border rounded-sm z-50',
|
||||
'px-2 text-2xs font-semibold w-fit absolute shadow -top-[9px] -left-[8px] border rounded-sm z-50 cursor-move',
|
||||
selected
|
||||
? 'bg-indigo-500/90 border-indigo-600 text-white'
|
||||
: 'bg-blue-500/90 border-blue-600 text-white'
|
||||
@@ -69,6 +70,7 @@
|
||||
{/if}
|
||||
</button>
|
||||
<span
|
||||
draggable="false"
|
||||
title="Move"
|
||||
on:mousedown|stopPropagation|capture
|
||||
class={classNames(
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
|
||||
const editorContext = getContext<AppEditorContext>('AppEditorContext')
|
||||
const movingcomponent = editorContext?.movingcomponent
|
||||
$: ismoving = movingcomponent != undefined && $movingcomponent === component.id
|
||||
$: ismoving = movingcomponent != undefined && $mode == 'dnd' && $movingcomponent === component.id
|
||||
|
||||
let initializing: boolean | undefined = undefined
|
||||
let componentContainerHeight: number = 0
|
||||
|
||||
@@ -157,11 +157,10 @@
|
||||
|
||||
cordDiff = { x: 0, y: 0 }
|
||||
|
||||
computeRect(target)
|
||||
|
||||
startDrag = setTimeout(() => {
|
||||
active = true
|
||||
trans = false
|
||||
computeRect(target)
|
||||
}, 200)
|
||||
_scrollTop = scrollElement.scrollTop
|
||||
|
||||
@@ -307,7 +306,7 @@
|
||||
on:click|stopPropagation={() => {
|
||||
startDrag && clearTimeout(startDrag)
|
||||
}}
|
||||
on:pointerdown|stopPropagation={pointerdown}
|
||||
on:pointerdown|stopPropagation|preventDefault={pointerdown}
|
||||
class="svlt-grid-item"
|
||||
class:svlt-grid-active={active || (trans && rect)}
|
||||
style="width: {active ? newSize.width : width}px; height:{active
|
||||
|
||||
Reference in New Issue
Block a user