From a0dcaa86682b204dc28000c712e68daa987f6862 Mon Sep 17 00:00:00 2001 From: Paul Pflugradt Date: Wed, 26 Oct 2016 19:20:29 +0200 Subject: [PATCH 1/4] update --- README.md | 8 +++++-- package.json | 4 ++-- src/parallax.vue | 57 +++++++++++++++++++++++++------------------- test/parallax.coffee | 1 + 4 files changed, 42 insertions(+), 28 deletions(-) diff --git a/README.md b/README.md index 162374d..78f51d7 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ Scrolls a image slower than the window to create a neat optical effect. # Install ```sh -npm install --save-dev vue-parallax +npm install --save-dev vue-parallax@1 ``` or include `build/bundle.js`. @@ -42,7 +42,7 @@ Name | type | default | description ---:| --- | ---| --- src | String | - | (required) path to image height | Number | 500 | height of the parallax element -speed | Number | 1 | 0 doesn't scroll the image, 1 scrolls through the whole image +speed | Number | 0.2 | 0.0 means the image will appear fixed in place, and 1.0 the image will flow at the same speed as the page content. #### Events Name | description @@ -51,6 +51,10 @@ image-loaded | will be called when the image is loaded loaded | will be called when the first calculation - after a image is loaded - is finished ## Changelog +- 1.1.0 +changed way the picture moves, now in line with other parallax implementations +now working on devices in portrait mode + - 1.0.0 some cleaning added unit tests diff --git a/package.json b/package.json index f82ba64..bda4f4f 100644 --- a/package.json +++ b/package.json @@ -40,8 +40,8 @@ "pug": "^2.0.0-beta6", "script-runner": "^0.1.5", "vue": "^1.0.26", - "vue-compiler": "^0.3.0", - "vue-dev-server": "^0.2.10", + "vue-compiler": "^1.0.0", + "vue-dev-server": "^1.0.0", "vue-html-loader": "^1.2.3", "vue-loader": "^8.5.2", "webpack": "^1.13.2" diff --git a/src/parallax.vue b/src/parallax.vue index 429afd2..2a63dc3 100644 --- a/src/parallax.vue +++ b/src/parallax.vue @@ -2,7 +2,7 @@