Skip to content
Snippets Groups Projects
Commit 81984974 authored by jojohoch's avatar jojohoch
Browse files

[player] Center only drop list elements in cloze texts

Drop lists that allow only one element but are not used in cloze texts
display their elements right-aligned
parent d4a46834
No related branches found
No related tags found
No related merge requests found
...@@ -44,7 +44,7 @@ import { FormElementComponent } from '../../directives/form-element-component.di ...@@ -44,7 +44,7 @@ import { FormElementComponent } from '../../directives/form-element-component.di
<div *ngIf="!dropListValueElement.imgSrc" <div *ngIf="!dropListValueElement.imgSrc"
class="list-item" class="list-item"
fxLayout="row" fxLayout="row"
[fxLayoutAlign]="elementModel.onlyOneItem ? 'center center' : 'none'" [fxLayoutAlign]="elementModel.onlyOneItem ? (clozeContext ? 'center center' : 'start center') : 'none'"
draggable="true" draggable="true"
(dragstart)="dragStart($event, dropListValueElement, index)" (dragend)="dragEnd($event)" (dragstart)="dragStart($event, dropListValueElement, index)" (dragend)="dragEnd($event)"
(dragenter)="dragEnterItem($event)" (dragenter)="dragEnterItem($event)"
...@@ -76,9 +76,10 @@ import { FormElementComponent } from '../../directives/form-element-component.di ...@@ -76,9 +76,10 @@ import { FormElementComponent } from '../../directives/form-element-component.di
'.list {padding: 2px;}', '.list {padding: 2px;}',
'.list-item {border-radius: 5px;}', '.list-item {border-radius: 5px;}',
':not(.cloze-context) .list-item {padding: 10px;}', ':not(.cloze-context) .list-item {padding: 10px;}',
'.cloze-context .list-item {padding: 0 5px; text-align: center; line-height: 1.2;}', '.cloze-context .list-item {padding: 0 5px; line-height: 1.2;}',
'.only-one-item .list-item {padding: 0 !important; line-height: 1.2; text-align: center;}', '.only-one-item.cloze-context .list-item {padding: 0;}',
'.only-one-item .list-item {height: 100%; min-height: 100%; min-width: 100%; width: 100%;}', '.only-one-item:not(.cloze-context) .list-item {padding: 0 10px;}',
'.only-one-item .list-item {height: 100%; min-height: 100%; min-width: 100%; width: 100%; line-height: 1.2;}',
'img.list-item {align-self: start; padding: 2px !important;}', 'img.list-item {align-self: start; padding: 2px !important;}',
'.vertical-orientation .list-item:not(:last-child) {margin-bottom: 5px;}', '.vertical-orientation .list-item:not(:last-child) {margin-bottom: 5px;}',
'.horizontal-orientation .list-item:not(:last-child) {margin-right: 5px;}', '.horizontal-orientation .list-item:not(:last-child) {margin-right: 5px;}',
......
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