Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Frontend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Arkindex
Frontend
Commits
f9e1c744
Verified
Commit
f9e1c744
authored
3 years ago
by
Erwan Rouchet
Browse files
Options
Downloads
Patches
Plain Diff
Wrap the OrientationPanel in a DropdownContent
parent
6418a5c5
No related branches found
No related tags found
1 merge request
!1033
Wrap the OrientationPanel in a DropdownContent
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
vue/Element/DetailsPanel.vue
+4
-1
4 additions, 1 deletion
vue/Element/DetailsPanel.vue
vue/Element/OrientationPanel.vue
+37
-31
37 additions, 31 deletions
vue/Element/OrientationPanel.vue
with
41 additions
and
32 deletions
vue/Element/DetailsPanel.vue
+
4
−
1
View file @
f9e1c744
...
...
@@ -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"
/>
...
...
This diff is collapsed.
Click to expand it.
vue/Element/OrientationPanel.vue
+
37
−
31
View file @
f9e1c744
<
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-nar
ro
w
"
>
<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 va
lues
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=
"
cont
ro
l
"
>
<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.inc
lu
d
es
(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
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment