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
1c9b9203
Commit
1c9b9203
authored
2 years ago
by
jojohoch
Browse files
Options
Downloads
Patches
Plain Diff
Remove unused parameter from UpdateTextareaRowsPipe
parent
80fc706d
No related branches found
No related tags found
No related merge requests found
Pipeline
#41934
passed
2 years ago
Stage: test
Stage: deploy
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
projects/common/components/input-elements/text-area.component.ts
+5
-6
5 additions, 6 deletions
...s/common/components/input-elements/text-area.component.ts
projects/common/pipes/update-textarea-rows.pipe.ts
+1
-5
1 addition, 5 deletions
projects/common/pipes/update-textarea-rows.pipe.ts
with
6 additions
and
11 deletions
projects/common/components/input-elements/text-area.component.ts
+
5
−
6
View file @
1c9b9203
...
@@ -28,12 +28,11 @@ import { FormElementComponent } from '../../directives/form-element-component.di
...
@@ -28,12 +28,11 @@ import { FormElementComponent } from '../../directives/form-element-component.di
autocorrect="off"
autocorrect="off"
spellcheck="false"
spellcheck="false"
value="{{elementModel.value}}"
value="{{elementModel.value}}"
[rows]="(isViewInitialized | async) &&
[rows]="(isViewInitialized | async) && elementModel.hasDynamicRowCount ?
elementModel.hasDynamicRowCount ?
(elementModel.expectedCharactersCount | updateTextareaRows:
(elementModel.rowCount | updateTextareaRows :
input.offsetWidth:
elementModel.expectedCharactersCount :
elementModel.styling.fontSize) :
input.offsetWidth:
elementModel.rowCount"
elementModel.styling.fontSize) : elementModel.rowCount"
[attr.inputmode]="elementModel.showSoftwareKeyboard ? 'none' : 'text'"
[attr.inputmode]="elementModel.showSoftwareKeyboard ? 'none' : 'text'"
[formControl]="elementFormControl"
[formControl]="elementFormControl"
[readonly]="elementModel.readOnly"
[readonly]="elementModel.readOnly"
...
...
This diff is collapsed.
Click to expand it.
projects/common/pipes/update-textarea-rows.pipe.ts
+
1
−
5
View file @
1c9b9203
...
@@ -4,11 +4,7 @@ import { Pipe, PipeTransform } from '@angular/core';
...
@@ -4,11 +4,7 @@ import { Pipe, PipeTransform } from '@angular/core';
name
:
'
updateTextareaRows
'
name
:
'
updateTextareaRows
'
})
})
export
class
UpdateTextareaRowsPipe
implements
PipeTransform
{
export
class
UpdateTextareaRowsPipe
implements
PipeTransform
{
transform
(
fixedRowCount
:
number
,
transform
(
expectedCharactersCount
:
number
,
inputWidth
:
number
,
fontSize
:
number
):
number
{
expectedCharactersCount
:
number
,
inputWidth
:
number
,
fontSize
:
number
):
number
{
const
averageCharWidth
=
fontSize
/
2
;
// s. AverageCharWidth of dotNet
const
averageCharWidth
=
fontSize
/
2
;
// s. AverageCharWidth of dotNet
return
Math
.
ceil
((
expectedCharactersCount
*
averageCharWidth
)
/
inputWidth
);
return
Math
.
ceil
((
expectedCharactersCount
*
averageCharWidth
)
/
inputWidth
);
}
}
...
...
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