Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
walint
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
hub
walint
Commits
f74bb6eb
Commit
f74bb6eb
authored
3 years ago
by
stuebinm
Browse files
Options
Downloads
Patches
Plain Diff
we don't support ellipses
parent
c89872d3
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/Badges.hs
+1
-4
1 addition, 4 deletions
lib/Badges.hs
lib/Properties.hs
+4
-5
4 additions, 5 deletions
lib/Properties.hs
with
5 additions
and
9 deletions
lib/Badges.hs
+
1
−
4
View file @
f74bb6eb
...
@@ -26,7 +26,6 @@ data BadgeArea =
...
@@ -26,7 +26,6 @@ data BadgeArea =
,
areaY
::
Double
,
areaY
::
Double
,
areaWidth
::
Double
,
areaWidth
::
Double
,
areaHeight
::
Double
,
areaHeight
::
Double
,
areaIsEllipse
::
Bool
}
}
deriving
(
Ord
,
Eq
,
Generic
,
Show
)
deriving
(
Ord
,
Eq
,
Generic
,
Show
)
...
@@ -61,9 +60,7 @@ badgeJsonArray (Badge token area) =
...
@@ -61,9 +60,7 @@ badgeJsonArray (Badge token area) =
,
"y"
.=
areaY
,
"y"
.=
areaY
,
"width"
.=
areaWidth
,
"width"
.=
areaWidth
,
"height"
.=
areaHeight
,
"height"
.=
areaHeight
,
"type"
.=
if
areaIsEllipse
,
"type"
.=
A
.
String
"rectangle"
then
A
.
String
"ellipse"
else
A
.
String
"rectangle"
]
]
badgeJson
::
FilePath
->
Badge
->
A
.
Value
badgeJson
::
FilePath
->
Badge
->
A
.
Value
...
...
This diff is collapsed.
Click to expand it.
lib/Properties.hs
+
4
−
5
View file @
f74bb6eb
...
@@ -231,11 +231,10 @@ checkObjectGroupProperty p@(Property name _) = case name of
...
@@ -231,11 +231,10 @@ checkObjectGroupProperty p@(Property name _) = case name of
ObjectPoint
{
..
}
->
ObjectPoint
{
..
}
->
offersBadge
(
Badge
token
(
BadgePoint
objectX
objectY
))
offersBadge
(
Badge
token
(
BadgePoint
objectX
objectY
))
ObjectRectangle
{
..
}
->
ObjectRectangle
{
..
}
->
offersBadge
(
Badge
token
area
)
if
isJust
objectEllipse
where
area
=
BadgeRect
then
offersBadge
objectX
objectY
$
Badge
token
(
BadgeRect
objectX
objectY
objectWidth
objectHeight
)
objectWidth
objectHeight
else
complain
"ellipses are not supported."
(
objectEllipse
==
Just
True
)
ObjectPolygon
{}
->
complain
"polygons are not supported."
ObjectPolygon
{}
->
complain
"polygons are not supported."
ObjectPolyline
{}
->
complain
"polylines are not supported."
ObjectPolyline
{}
->
complain
"polylines are not supported."
ObjectText
{}
->
complain
"cannot use texts to define badge areas."
ObjectText
{}
->
complain
"cannot use texts to define badge areas."
...
...
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