Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
Graphics generator
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
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
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
Alexa Valentová
Graphics generator
Commits
5d33eaa6
Commit
5d33eaa6
authored
9 months ago
by
Tomi Valentová
Browse files
Options
Downloads
Patches
Plain Diff
add contractedBy to regional success template
parent
13435e64
No related branches found
No related tags found
No related merge requests found
Pipeline
#19150
passed
9 months ago
Stage: build
Stage: test_deploy
Changes
3
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
VERSION
+1
-1
1 addition, 1 deletion
VERSION
frontend/src/views/regional_success/RegionalSuccess.vue
+11
-1
11 additions, 1 deletion
frontend/src/views/regional_success/RegionalSuccess.vue
frontend/src/views/regional_success/canvas.js
+30
-0
30 additions, 0 deletions
frontend/src/views/regional_success/canvas.js
with
42 additions
and
2 deletions
VERSION
+
1
−
1
View file @
5d33eaa6
2.
8.1
2.
9.0
This diff is collapsed.
Click to expand it.
frontend/src/views/regional_success/RegionalSuccess.vue
+
11
−
1
View file @
5d33eaa6
...
...
@@ -83,7 +83,7 @@ export default {
fourthRow
:
null
,
fourthEmoji
:
null
,
//
contractedBy: DEFAULT_CONTRACTOR,
contractedBy
:
DEFAULT_CONTRACTOR
,
logoImage
:
null
,
logoPosition
:
LOGO_POSITIONS
.
top_right
,
...
...
@@ -126,6 +126,7 @@ export default {
logoImage
:
this
.
logoImage
,
nameText
:
this
.
nameText
,
nameTextDesc
:
this
.
nameTextDesc
,
contractedBy
:
this
.
contractedBy
,
colors
:
this
.
colors
,
};
...
...
@@ -158,6 +159,7 @@ export default {
vm
.
logoImage
,
vm
.
nameText
,
vm
.
nameTextDesc
,
vm
.
contractedBy
,
vm
.
colors
,
],
async
(
value
)
=>
{
...
...
@@ -300,6 +302,14 @@ export default {
v-model=
"logoPosition"
zIndex=
"6"
/>
<ShortTextInput
name=
"Zadavatel a zpracovatel"
v-model=
"contractedBy"
:defaultValue=
"DEFAULT_CONTRACTOR"
:important=
"false"
zIndex=
"5"
/>
</
template
>
</MainContainer>
</main>
...
...
This diff is collapsed.
Click to expand it.
frontend/src/views/regional_success/canvas.js
+
30
−
0
View file @
5d33eaa6
...
...
@@ -12,6 +12,7 @@ import backgroundArrowsImageURL from "../../assets/template/regional_success/arr
//import overlayURL from '../../assets/template/poster/overlay.png'
let
mainTextBox
=
null
;
let
contractedByTextbox
=
null
;
let
logoImage
=
null
;
let
mainImage
=
null
;
...
...
@@ -58,6 +59,7 @@ const redraw = async (canvas, options) => {
fourthEmoji
,
nameText
,
nameTextDesc
,
contractedByTextbox
,
gradientRect
,
],
canvas
,
...
...
@@ -79,6 +81,11 @@ const redraw = async (canvas, options) => {
headerHeight
+
(
rowHeightBg
-
emojiHeight
)
/
2
,
);
const
contractedByTextSize
=
Math
.
ceil
(
canvas
.
height
*
0.013
);
const
contractedByTextMaxWidth
=
Math
.
ceil
(
canvas
.
width
*
0.9
);
const
contractedByTextSideMargin
=
Math
.
ceil
(
canvas
.
width
*
0.068
);
const
contractedByTextBottomMargin
=
Math
.
ceil
(
canvas
.
height
*
0.023
)
const
rowsMaxWidth
=
425
;
const
rowsTextSize
=
38
;
const
rowsLineHeight
=
0.9
;
...
...
@@ -463,6 +470,29 @@ const redraw = async (canvas, options) => {
}
/* END Name text description render */
/* BEGIN Contracted by render */
if
(
options
.
contractedBy
!==
null
)
{
contractedByTextbox
=
new
fabric
.
Textbox
(
options
.
contractedBy
,
{
left
:
canvas
.
width
-
contractedByTextMaxWidth
-
contractedByTextSideMargin
,
top
:
canvas
.
height
-
contractedByTextBottomMargin
-
contractedByTextSize
,
width
:
contractedByTextMaxWidth
,
fontFamily
:
"
Roboto Condensed
"
,
fontSize
:
contractedByTextSize
,
textAlign
:
"
right
"
,
fill
:
"
#505050
"
,
selectable
:
false
,
zIndex
:
40
,
});
checkTextBoxHeight
(
contractedByTextbox
,
1
);
canvas
.
add
(
contractedByTextbox
);
}
/* END Contracted by render */
sortObjects
(
canvas
);
if
(
!
pointerDownEventAssigned
)
{
...
...
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