Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Fractalis
fractal.js
Commits
153eb05e
Commit
153eb05e
authored
May 17, 2018
by
Sascha Herzinger
Browse files
periodically set SVG HTML position when scroll event is not fired
parent
16511670
Pipeline
#4913
passed with stages
in 6 minutes and 27 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/vue/components/HTML2SVG.vue
View file @
153eb05e
...
...
@@ -21,7 +21,8 @@
posX
:
0
,
posY
:
0
,
width
:
0
,
height
:
0
height
:
0
,
setPositionInterval
:
null
}
},
props
:
{
...
...
@@ -84,10 +85,12 @@
}
vm
.
$el
.
appendChild
(
this
.
$refs
.
htmlContent
)
this
.
$nextTick
(
this
.
setPosition
)
this
.
setPositionInterval
=
window
.
setInterval
(
this
.
setPosition
,
1000
)
window
.
addEventListener
(
'
scroll
'
,
this
.
setPosition
,
true
)
},
beforeDestroy
()
{
this
.
$refs
.
htmlContent
.
remove
()
window
.
clearInterval
(
this
.
setPositionInterval
)
window
.
removeEventListener
(
'
scroll
'
,
this
.
setPosition
,
true
)
}
}
...
...
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