Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
V
verona-modules-aspect
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
IQB
verona-modules-aspect
Commits
83406aa2
Commit
83406aa2
authored
2 years ago
by
rhenck
Browse files
Options
Downloads
Patches
Plain Diff
Improve default values for several elements
Most importantly dynamic sections are now default.
parent
21eda380
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
projects/common/util/element.factory.ts
+11
-11
11 additions, 11 deletions
projects/common/util/element.factory.ts
projects/common/util/unit.factory.ts
+1
-1
1 addition, 1 deletion
projects/common/util/unit.factory.ts
with
12 additions
and
12 deletions
projects/common/util/element.factory.ts
+
11
−
11
View file @
83406aa2
...
...
@@ -89,7 +89,7 @@ export abstract class ElementFactory {
return
{
type
:
element
.
type
as
UIElementType
,
id
:
element
.
id
?
String
(
element
.
id
)
:
'
id_placeholder
'
,
width
:
element
.
width
||
1
9
0
,
width
:
element
.
width
||
1
8
0
,
height
:
element
.
height
||
60
};
}
...
...
@@ -97,7 +97,7 @@ export abstract class ElementFactory {
static
initInputElement
(
element
:
Partial
<
UIElement
>
):
InputElement
{
return
{
...
ElementFactory
.
initElement
(
element
),
label
:
element
.
value
!==
undefined
?
element
.
label
as
string
:
'
Be
ispielbe
schriftung
'
,
label
:
element
.
value
!==
undefined
?
element
.
label
as
string
:
'
Beschriftung
'
,
value
:
element
.
value
!==
undefined
?
element
.
value
as
InputElementValue
:
null
,
required
:
element
.
required
!==
undefined
?
element
.
required
as
boolean
:
false
,
requiredWarnMessage
:
element
.
requiredWarnMessage
!==
undefined
?
...
...
@@ -110,7 +110,7 @@ export abstract class ElementFactory {
static
initPositionProps
(
defaults
:
Record
<
string
,
UIElementValue
>
=
{}):
PositionProperties
{
return
{
fixedSize
:
defaults
.
fixedSize
!==
undefined
?
defaults
.
fixedSize
as
boolean
:
false
,
dynamicPositioning
:
defaults
.
dynamicPositioning
!==
undefined
?
defaults
.
dynamicPositioning
as
boolean
:
fals
e
,
dynamicPositioning
:
defaults
.
dynamicPositioning
!==
undefined
?
defaults
.
dynamicPositioning
as
boolean
:
tru
e
,
xPosition
:
defaults
.
xPosition
!==
undefined
?
defaults
.
xPosition
as
number
:
0
,
yPosition
:
defaults
.
yPosition
!==
undefined
?
defaults
.
yPosition
as
number
:
0
,
useMinHeight
:
defaults
.
useMinHeight
!==
undefined
?
defaults
.
useMinHeight
as
boolean
:
false
,
...
...
@@ -239,7 +239,7 @@ export abstract class ElementFactory {
private
static
createClozeElement
(
element
:
Partial
<
ClozeElement
>
):
ClozeElement
{
return
{
...
ElementFactory
.
initElement
({
width
:
450
,
height
:
200
,
...
element
}),
...
ElementFactory
.
initElement
({
height
:
200
,
...
element
}),
type
:
'
cloze
'
,
document
:
element
.
document
!==
undefined
?
{
...
...
@@ -268,7 +268,7 @@ export abstract class ElementFactory {
position
:
ElementFactory
.
initPositionProps
(
element
.
position
),
styling
:
{
...
ElementFactory
.
initBasicStyles
(
element
.
styling
),
lineHeight
:
element
.
styling
?.
lineHeight
!==
undefined
?
element
.
styling
?.
lineHeight
as
number
:
1
3
5
lineHeight
:
element
.
styling
?.
lineHeight
!==
undefined
?
element
.
styling
?.
lineHeight
as
number
:
15
0
}
};
}
...
...
@@ -317,9 +317,9 @@ export abstract class ElementFactory {
highlightReceivingDropListColor
:
element
.
highlightReceivingDropListColor
!==
undefined
?
element
.
highlightReceivingDropListColor
:
'
#add8e6
'
,
styling
:
{
...
ElementFactory
.
initBasicStyles
({
backgroundColor
:
'
#
eeeeec
'
,
...
element
.
styling
}),
...
ElementFactory
.
initBasicStyles
({
backgroundColor
:
'
#
f4f4f2
'
,
...
element
.
styling
}),
itemBackgroundColor
:
element
.
itemBackgroundColor
!==
undefined
?
element
.
itemBackgroundColor
as
string
:
'
#
add8e6
'
element
.
itemBackgroundColor
as
string
:
'
#
c9e0e0
'
}
};
}
...
...
@@ -394,7 +394,7 @@ export abstract class ElementFactory {
private
static
createRadioButtonGroupElement
(
element
:
Partial
<
RadioButtonGroupElement
>
):
RadioButtonGroupElement
{
return
{
...
ElementFactory
.
initInputElement
({
height
:
85
,
...
element
}),
...
ElementFactory
.
initInputElement
({
height
:
100
,
...
element
}),
type
:
'
radio
'
,
richTextOptions
:
element
.
richTextOptions
!==
undefined
?
element
.
richTextOptions
:
[],
alignment
:
element
.
alignment
!==
undefined
?
element
.
alignment
:
'
column
'
,
...
...
@@ -413,7 +413,7 @@ export abstract class ElementFactory {
...
ElementFactory
.
initInputElement
({
height
:
100
,
...
element
}),
// TODO better name
type
:
'
radio-group-images
'
,
columns
:
element
.
columns
!==
undefined
?
element
.
columns
:
[],
position
:
ElementFactory
.
initPositionProps
(
element
.
position
),
position
:
ElementFactory
.
initPositionProps
(
{
marginBottom
:
40
,
...
element
.
position
}
),
styling
:
ElementFactory
.
initBasicStyles
({
backgroundColor
:
'
transparent
'
,
...
element
.
styling
})
};
}
...
...
@@ -493,7 +493,7 @@ export abstract class ElementFactory {
private
static
createTextFieldElement
(
element
:
Partial
<
TextFieldElement
>
):
TextFieldElement
{
return
{
...
ElementFactory
.
initInputElement
({
width
:
23
0
,
height
:
1
0
0
,
...
element
}),
...
ElementFactory
.
initInputElement
({
width
:
18
0
,
height
:
1
2
0
,
...
element
}),
type
:
'
text-field
'
,
appearance
:
element
.
appearance
!==
undefined
?
element
.
appearance
:
'
outline
'
,
minLength
:
element
.
minLength
!==
undefined
?
element
.
minLength
:
0
,
...
...
@@ -534,7 +534,7 @@ export abstract class ElementFactory {
styling
:
{
...
ElementFactory
.
initBasicStyles
({
backgroundColor
:
'
transparent
'
,
...
element
.
styling
}),
lineHeight
:
element
.
styling
?.
lineHeight
!==
undefined
?
element
.
styling
?.
lineHeight
as
number
:
135
,
selectionColor
:
element
.
styling
?.
selectionColor
!==
undefined
?
element
.
styling
.
selectionColor
:
'
lightgreen
'
selectionColor
:
element
.
styling
?.
selectionColor
!==
undefined
?
element
.
styling
.
selectionColor
:
'
#c7f3d0
'
}
};
}
...
...
This diff is collapsed.
Click to expand it.
projects/common/util/unit.factory.ts
+
1
−
1
View file @
83406aa2
...
...
@@ -34,7 +34,7 @@ export abstract class UnitFactory {
[],
height
:
section
&&
section
.
height
!==
undefined
?
section
.
height
:
400
,
backgroundColor
:
section
&&
section
.
backgroundColor
!==
undefined
?
section
.
backgroundColor
:
'
#ffffff
'
,
dynamicPositioning
:
section
&&
section
.
dynamicPositioning
!==
undefined
?
section
.
dynamicPositioning
:
fals
e
,
dynamicPositioning
:
section
&&
section
.
dynamicPositioning
!==
undefined
?
section
.
dynamicPositioning
:
tru
e
,
autoColumnSize
:
section
&&
section
.
autoColumnSize
!==
undefined
?
section
.
autoColumnSize
:
true
,
autoRowSize
:
section
&&
section
.
autoRowSize
!==
undefined
?
section
.
autoRowSize
:
true
,
gridColumnSizes
:
section
&&
section
.
gridColumnSizes
!==
undefined
?
section
.
gridColumnSizes
:
'
1fr 1fr
'
,
...
...
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