Skip to content

Commit

Permalink
Bugfix missing swiper instance
Browse files Browse the repository at this point in the history
  • Loading branch information
Timo committed Nov 1, 2018
1 parent 5364a64 commit e2e4eda
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 6 deletions.
4 changes: 3 additions & 1 deletion demo/dist/bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ var F7WelcomescreenPlugin = {
* @private
*/
function initSwiper() {
swiper = new Swiper('.welcomescreen-swiper', {
swiper = window.swiper.create('.welcomescreen-swiper', {
direction: 'horizontal',
loop: options.loop,
pagination: options.pagination ? { el: '.swiper-pagination' } : undefined,
Expand Down Expand Up @@ -415,6 +415,8 @@ var F7WelcomescreenPlugin = {
init() {
window.Dom7 = this.$;
window.Template7 = this.t7;
window.swiper = this.swiper;

// Click handler to close welcomescreen
window.Dom7(document).on('click', '.close-welcomescreen', function (e) {
e.preventDefault();
Expand Down
2 changes: 1 addition & 1 deletion demo/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion demo/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "f7-welcomescreen-demo",
"version": "2.1.3",
"version": "2.1.4",
"description": "A demo app that shows how to use f7-welcomescreen",
"main": "index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "f7-welcomescreen",
"version": "2.1.3",
"version": "2.1.4",
"description": "This Framework7 plugin will guide the user through a tour of your app.",
"main": "src/f7.welcomescreen.js",
"repository": {
Expand Down
4 changes: 3 additions & 1 deletion src/f7.welcomescreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ var F7WelcomescreenPlugin = {
* @private
*/
function initSwiper() {
swiper = new Swiper('.welcomescreen-swiper', {
swiper = window.swiper.create('.welcomescreen-swiper', {
direction: 'horizontal',
loop: options.loop,
pagination: options.pagination ? { el: '.swiper-pagination' } : undefined,
Expand Down Expand Up @@ -250,6 +250,8 @@ var F7WelcomescreenPlugin = {
init() {
window.Dom7 = this.$;
window.Template7 = this.t7;
window.swiper = this.swiper;

// Click handler to close welcomescreen
window.Dom7(document).on('click', '.close-welcomescreen', function (e) {
e.preventDefault();
Expand Down

0 comments on commit e2e4eda

Please sign in to comment.