Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitad6a1a7

Browse files
committed
bugfix
1 parent81fd3d5 commitad6a1a7

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ For examples see [`dev/`](dev/).
3333
| ---:| ---| ---| ---|
3434
| src| String| -| (required) path to image|
3535
| height| Number| 500| height of the parallax element|
36-
| speed| Number|0.8| 0 doesn't scroll the image, 1 scrolls through the whole image|
36+
| speed| Number|1| 0 doesn't scroll the image, 1 scrolls through the whole image|
3737

3838

3939
#Development

‎dev/basic.vue‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<template lang="jade">
2-
parallax(src="parallax1.jpg")
2+
parallax(src="http://materializecss.com/images/parallax1.jpg")
33
.parallax-between
44
a(href="https://github.com/vue-comps/vue-parallax/blob/master/dev/basic.vue") source
5-
parallax(src="parallax2.jpg")
5+
parallax(src="http://materializecss.com/images/parallax2.jpg")
66
.parallax-between
77
.parallax-between
88
</template>

‎src/parallax.vue‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ module.exports =
2626
default:500
2727
"speed":
2828
type:Number
29-
default:0.8
29+
default:1
3030
3131
data:->
3232
viewportHeight:0
@@ -59,7 +59,7 @@ module.exports =
5959
@parallaxDistance=Math.floor(@$el.clientWidth*@ratio)- height
6060
@scrollDistance=@viewportHeight+ height*2
6161
@style.height= height+"px"
62-
@processScroll()
62+
@$nextTick@processScroll
6363
processScroll:->
6464
rect=@$el.getBoundingClientRect()
6565
ifrect.bottom>0andrect.top<@viewportHeight# in viewport

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp