Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AlekSIS-App-Alsijil
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
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
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
Show more breadcrumbs
AlekSIS®
Official
AlekSIS-App-Alsijil
Commits
3a28bb26
Commit
3a28bb26
authored
10 months ago
by
permcu
Browse files
Options
Downloads
Patches
Plain Diff
Introduce top-margin prop - document the magic number
parent
6ea5c885
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!355
Implement infinite scrolling and by date navigation for coursebook
,
!350
Resolve "Add simple course book list"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
aleksis/apps/alsijil/frontend/components/coursebook/Coursebook.vue
+10
-3
10 additions, 3 deletions
...pps/alsijil/frontend/components/coursebook/Coursebook.vue
with
10 additions
and
3 deletions
aleksis/apps/alsijil/frontend/components/coursebook/Coursebook.vue
+
10
−
3
View file @
3a28bb26
...
...
@@ -23,7 +23,7 @@
v-intersect="{
handler: intersectHandler(date, first, last),
options: {
rootMargin: '-
165
px 0px 0px 0px',
rootMargin: '-
' + topMargin + '
px 0px 0px 0px',
threshold: [0, 1],
},
}"
...
...
@@ -102,6 +102,14 @@ export default {
required
:
false
,
default
:
null
,
}
,
/**
* Margin from coursebook list to top of viewport in pixels
*/
topMargin
:
{
type
:
Number
,
required
:
false
,
default
:
165
,
}
,
}
,
data
()
{
return
{
...
...
@@ -258,8 +266,7 @@ export default {
const
entry
=
entries
[
0
];
if
(
entry
.
isIntersecting
)
{
// TODO: Make 165 a var?
if
((
entry
.
boundingClientRect
.
top
<=
165
)
||
first
)
{
if
((
entry
.
boundingClientRect
.
top
<=
this
.
topMargin
)
||
first
)
{
console
.
log
(
'
@
'
,
date
.
toISODate
());
this
.
setDate
(
date
.
toISODate
());
}
...
...
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