Pridan fotoeditor

This commit is contained in:
Michal Kváček
2023-10-27 22:30:47 +02:00
parent 4c8952117b
commit 100e1fa33b
18 changed files with 502 additions and 23 deletions
+1 -1
View File
@@ -17,7 +17,7 @@ const poisWithGPS = computed(() => flight.value.track.map(poi => poi.pointOfInte
const mapMarkers = [flight.value.takeoffAirport].concat(poisWithGPS.value).concat([flight.value.landingAirport]);
const pointsOfInterests = computed(() => mapMarkers
.filter(marker => marker.gpsLatitude && marker.gpsLongiture)
.filter(marker => marker.gpsLatitude && marker.gpsLongitude)
.map(
marker => ({label: marker.name, position: {lat: marker.gpsLatitude, lng: marker.gpsLongitude}})
));
-3
View File
@@ -27,9 +27,6 @@ const props = defineProps({
})
const track = ref([]);
const speed = ref([]);
const elevation = ref([]);
const bounds = computed(() => {
const photosTransformed = props.photos.map(p => ({position: {lat: p.gpsLatitude, lng: p.gpsLongitude}}));
const allData = [...props.markers, ...track.value, ...photosTransformed];
+8 -8
View File
@@ -73,9 +73,9 @@ const openBatchEdit = () => {
emits('batch-edit', photos);
}
const batchRotate = (angle) => {
const batchRotate = (direction) => {
const photos = selectedPhotos.value;
emits("batch-rotate", {photos, angle});
emits("batch-rotate", {photos, direction});
}
const isBatchEditAllowed = computed(() => Object.values(batchEdit.value).filter(v => v).length > 0);
@@ -139,9 +139,9 @@ const batchOptionsProps = computed(() => ({
<q-icon name="gps_fixed" v-if="photo.gpsLatitude && photo.gpsLongitude"/>
<q-icon name="gps_off" v-else/>
</div>
<q-btn flat icon="edit" color="blue" @click="openEdit(photo)"></q-btn>
<q-btn flat icon="delete" color="red" @click="confirmPhotoDelete(photo.id)"></q-btn>
<q-btn flat icon="edit" color="black" :to="{name: 'photoEditor', params: {id: photo.id}}" />
<q-btn flat icon="info" color="blue" @click="openEdit(photo)" />
<q-btn flat icon="delete" color="red" @click="confirmPhotoDelete(photo.id)" />
</q-card-actions>
</q-card>
</div>
@@ -151,9 +151,9 @@ const batchOptionsProps = computed(() => ({
<q-card>
<q-card-actions>
<q-checkbox v-model="checkAll" label="Vybrat vše"/>
<q-btn v-bind="batchOptionsProps" icon="edit" :color="isBatchEditAllowed ? 'primary' : 'grey'" @click="openBatchEdit"/>
<q-btn v-bind="batchOptionsProps" icon="rotate_left" :color="isBatchEditAllowed ? 'secondary' : 'grey'" @click="batchRotate(90)"/>
<q-btn v-bind="batchOptionsProps" icon="rotate_right" :color="isBatchEditAllowed ? 'secondary' : 'grey'" @click="batchRotate(-90)"/>
<q-btn v-bind="batchOptionsProps" icon="info" :color="isBatchEditAllowed ? 'primary' : 'grey'" @click="openBatchEdit"/>
<q-btn v-bind="batchOptionsProps" icon="rotate_left" :color="isBatchEditAllowed ? 'secondary' : 'grey'" @click="batchRotate('counterClockwise')"/>
<q-btn v-bind="batchOptionsProps" icon="rotate_right" :color="isBatchEditAllowed ? 'secondary' : 'grey'" @click="batchRotate('clockwise')"/>
<q-btn v-bind="batchOptionsProps" icon="delete" :color="isBatchEditAllowed ? 'red' : 'grey'" @click="confirmBatchPhotoDelete"/>
</q-card-actions>
</q-card>