Skip to content
Snippets Groups Projects
Commit cab4aa62 authored by Bastien Abadie's avatar Bastien Abadie
Browse files

Merge branch 'orientation-panel-panel' into 'master'

Wrap the OrientationPanel in a DropdownContent

Closes #748

See merge request !1033
parents 6418a5c5 f9e1c744
No related branches found
No related tags found
1 merge request!1033Wrap the OrientationPanel in a DropdownContent
......@@ -42,7 +42,10 @@
<div v-if="!retrievedDetails" class="loading-content loader"></div>
<template v-else>
<OrientationPanel :element-id="elementId" v-if="elementType.folder === false" />
<template v-if="elementType.folder === false">
<OrientationPanel :element-id="elementId" />
<hr />
</template>
<DropdownContent title="Classifications" :disabled="(!canWrite(corpus) || !hasMlClasses) && !classifications.length">
<HelpModal class="is-pulled-right" title="Help for classifications" :data="CLASSIFICATIONS_HELP" />
......
<template>
<div class="field is-horizontal">
<div class="field-label is-normal is-flex-grow-0">
<div class="label">
Rotation
<DropdownContent title="Orientation">
<div class="field is-horizontal">
<div class="field-label is-normal is-flex-grow-0">
<div class="label">
Rotation
</div>
</div>
</div>
<div class="field-body">
<div class="field is-narrow">
<div class="control">
<div class="select is-fullwidth">
<select v-model="rotationAngle" :disabled="loading">
<option v-for="rotation in allowedRotations" :key="rotation" :value="rotation">
{{ rotation }}°
</option>
<!-- Handle non-allowed values set via the API -->
<option v-if="!allowedRotations.includes(rotationAngle)" :value="rotationAngle" disabled>
{{ rotationAngle }}°
</option>
</select>
<div class="field-body">
<div class="field is-narrow">
<div class="control">
<div class="select is-fullwidth">
<select v-model="rotationAngle" :disabled="loading">
<option v-for="rotation in allowedRotations" :key="rotation" :value="rotation">
{{ rotation }}°
</option>
<!-- Handle non-allowed values set via the API -->
<option v-if="!allowedRotations.includes(rotationAngle)" :value="rotationAngle" disabled>
{{ rotationAngle }}°
</option>
</select>
</div>
</div>
</div>
</div>
<div class="field-label is-normal has-text-left">
<div class="control">
<input
id="mirroredSwitch"
type="checkbox"
class="switch is-rounded is-info"
:checked="mirrored"
:disabled="loading"
v-on:click="toggleMirrored"
/>
<label for="mirroredSwitch">Mirror</label>
<div class="field-label is-normal has-text-left">
<div class="control">
<input
id="mirroredSwitch"
type="checkbox"
class="switch is-rounded is-info"
:checked="mirrored"
:disabled="loading"
v-on:click="toggleMirrored"
/>
<label for="mirroredSwitch">Mirror</label>
</div>
</div>
</div>
</div>
</div>
</DropdownContent>
</template>
<script>
import { mapState, mapActions } from 'vuex'
import DropdownContent from '~/vue/DropdownContent'
export default {
props: {
......@@ -48,6 +51,9 @@ export default {
required: true
}
},
components: {
DropdownContent
},
data: () => ({
allowedRotations: [0, 90, 180, 270],
rotationAngle: 0,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment