Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
S
Systems Frontend
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
155
Issues
155
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
2
Merge Requests
2
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Test Cases
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Motion Bank
Applications
Systems Frontend
Commits
83bbeb4d
Commit
83bbeb4d
authored
Oct 28, 2019
by
christianrhansen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mobile: watching datasets from move- and resize-handler (buggy)
parent
7a445a07
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
6 deletions
+16
-6
src/components/mosys
src/components/mosys
+1
-1
src/plugins/intersection-observer.js
src/plugins/intersection-observer.js
+15
-5
No files found.
mosys
@
2853b20e
Compare
1d52a57a
...
2853b20e
Subproject commit
1d52a57a6afd99e86bb8bbc3c7766f60dbe1d383
Subproject commit
2853b20e959c71780ddbcdcb2d5ef96a66081c2d
src/plugins/intersection-observer.js
View file @
83bbeb4d
export
default
({
Vue
})
=>
{
Vue
.
directive
(
'
intersection-observer
'
,
{
inserted
:
function
(
el
)
{
// bind: function (el, binding, vnode) {
bind
:
function
(
el
)
{
const
options
=
{
root
:
null
,
//
root: null,
threshold
:
'
0
'
}
const
observer
=
new
IntersectionObserver
(
observerCallback
,
options
)
observer
.
observe
(
el
)
function
observerCallback
(
entries
)
{
// console.log('entries', entries)
entries
.
forEach
(
entry
=>
{
if
(
entry
.
isIntersecting
)
{
console
.
log
(
'
isIntersecting
'
)
// console.log('BINDING', binding)
// console.log('isIntersecting', vnode)
// vnode.context.handlerNewCell.move.dataLeft = undefined
// vnode.context.handlerNewCell.move.dataLeft = undefined
el
.
dataset
.
left
=
'
xxx
'
}
else
{
console
.
log
(
'
nicht mehr intersecting
'
)
console
.
log
(
entry
.
boundingClientRect
.
left
)
// console.log('nicht mehr intersecting', vnode)
// vnode.context.handlerNewCell.move.dataLeft = entry.boundingClientRect.left
el
.
dataset
.
left
=
entry
.
boundingClientRect
.
left
// console.log('plugin', el.dataset)
// console.log(el.dataset.left)
// console.log('----------')
}
})
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment