remove unused transition-group
This commit is contained in:
parent
4f2ecd14f4
commit
584f9e593b
1 changed files with 48 additions and 50 deletions
|
@ -1,57 +1,55 @@
|
||||||
<template>
|
<template>
|
||||||
<section class="satellite-list">
|
<section class="satellite-list">
|
||||||
Satellites:
|
Satellites:
|
||||||
<transition-group name="draggable-items-list">
|
<div v-for="satellite,index in satellites"
|
||||||
<div v-for="satellite,index in satellites"
|
class="satellite-list-entry"
|
||||||
class="satellite-list-entry"
|
:key="satellite.name"
|
||||||
:key="satellite.name"
|
:class="{
|
||||||
:class="{
|
dragging: dragIndex === index,
|
||||||
dragging: dragIndex === index,
|
dragunder: dropIndex === index && dragIndex < index,
|
||||||
dragunder: dropIndex === index && dragIndex < index,
|
dragover: dropIndex === index && dragIndex > index
|
||||||
dragover: dropIndex === index && dragIndex > index
|
}"
|
||||||
}"
|
:style="dragIndex === index ? `transform: translateY(${dragDelta}px)` : ''"
|
||||||
:style="dragIndex === index ? `transform: translateY(${dragDelta}px)` : ''"
|
@pointerenter="onDragEnter(index)"
|
||||||
@pointerenter="onDragEnter(index)"
|
@pointerleave="onDragLeave(index)"
|
||||||
@pointerleave="onDragLeave(index)"
|
>
|
||||||
>
|
<header>
|
||||||
<header>
|
<span class="satellite-name">
|
||||||
<span class="satellite-name">
|
<input type="text"
|
||||||
<input type="text"
|
:value="satellite.name"
|
||||||
:value="satellite.name"
|
@keydown.enter="update(index, 'name', $event.target)"
|
||||||
@keydown.enter="update(index, 'name', $event.target)"
|
@blur="update(index, 'name', $event.target)"
|
||||||
@blur="update(index, 'name', $event.target)"
|
/>
|
||||||
/>
|
</span>
|
||||||
</span>
|
</header>
|
||||||
</header>
|
<div class="options">
|
||||||
<div class="options">
|
<span class="satellite-type">
|
||||||
<span class="satellite-type">
|
<select
|
||||||
<select
|
:value="satellite.type"
|
||||||
:value="satellite.type"
|
@change="update(index, 'type', $event.target)"
|
||||||
@change="update(index, 'type', $event.target)"
|
>
|
||||||
>
|
<option v-for="type in satelliteTypes">{{ type }}</option>
|
||||||
<option v-for="type in satelliteTypes">{{ type }}</option>
|
</select>
|
||||||
</select>
|
</span>
|
||||||
</span>
|
<span class="satellite-radius" :class="satellite.type">
|
||||||
<span class="satellite-radius" :class="satellite.type">
|
Radius r:
|
||||||
Radius r:
|
<input type="range" :min="MIN_SIZE_MOON" :max="MAX_SIZE_MOON"
|
||||||
<input type="range" :min="MIN_SIZE_MOON" :max="MAX_SIZE_MOON"
|
:disabled="satellite.type !== 'moon'"
|
||||||
:disabled="satellite.type !== 'moon'"
|
:value="satellite.radius"
|
||||||
:value="satellite.radius"
|
@input="update(index, 'radius', $event.target, true)"
|
||||||
@input="update(index, 'radius', $event.target, true)"
|
/>
|
||||||
/>
|
</span>
|
||||||
</span>
|
<span class="actions">
|
||||||
<span class="actions">
|
<button class="move" title="drag to reorder"
|
||||||
<button class="move" title="drag to reorder"
|
@pointerdown="startDragging(index, $event)"
|
||||||
@pointerdown="startDragging(index, $event)"
|
@pointerup="stopDragging"
|
||||||
@pointerup="stopDragging"
|
> </button>
|
||||||
> </button>
|
<button class="delete" title="delete satellite"
|
||||||
<button class="delete" title="delete satellite"
|
@click="deleteSatellite(index)"
|
||||||
@click="deleteSatellite(index)"
|
> </button>
|
||||||
> </button>
|
</span>
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</transition-group>
|
</div>
|
||||||
<button class="add"> </button>
|
<button class="add"> </button>
|
||||||
</section>
|
</section>
|
||||||
</template>
|
</template>
|
||||||
|
|
Loading…
Add table
Reference in a new issue