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

Commitca827c4

Browse files
committed
bugfix
1 parent68c3ca0 commitca827c4

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

‎README.md‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ image-loaded | will be called when the image is loaded
5151
loaded | will be called when the first calculation - after a image is loaded - is finished
5252

5353
##Changelog
54+
- 1.1.1
55+
bugfix in portrait mode
56+
5457
- 1.1.0
5558
changed way the picture moves, now in line with other parallax implementations
5659
now working on devices in portrait mode

‎src/parallax.vue‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,16 +43,15 @@ module.exports =
4343
backgroundHeight:->
4444
ratio=@imgRatio/@elRatio
4545
if ratio*@height>=@vpHeight
46+
@offset= (ratio*@imgHeight-@height)/2
4647
return ratio
4748
else
49+
@offset=0
4850
return@vpHeight/@height
4951
50-
absoluteBackgroundHeight:->@backgroundHeight*@imgHeight
51-
offset:->
52-
offset= (@absoluteBackgroundHeight-@height)/2
53-
return offset
5452
5553
data:->
54+
offset:0
5655
vpHeight:0
5756
imgRatio:1
5857
elRatio:1

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp