Giter Club home page Giter Club logo

vue-loop's People

Contributors

atuna avatar bgian avatar divmgl avatar simonhaenisch avatar sirlancelot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vue-loop's Issues

Horizontal demo doesn't like ultrawide aspect ratios

I have an ultrawide 21:9 monitor (43:18 technically), and when scrolling through the horizontal demo it visibly snaps the red div back to the left when about 1/3rd of the pink div is still visible.

Display resolution: 3440x1440
Chrome version 58.0.3029.96 (64-bit)
Windows 10 64-bit

Does not work on Firefox

Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:53.0) Gecko/20100101 Firefox/53.0

No errors in the console

How can I load dynamic data

Sorry if I am being stupid here, but I want to load dynamic data from the server on a scroll. How can I call it?

Extra item added at the bottom

Using the exact example code, a strange issue is appearing in Chrome. When scrolling to the bottom of the page, after reaching the "Vue Loop" white page, an additional item ("1") is added. This causes an undesirable effect of reaching the "Vue Loop" page, followed by "1" and then "Vue Loop" again as the scroll bar jumps to the top.

<div class="loop-container full">
      <div class="item" style="background: white;"><h1>Vue Loop</h1>
        <p>Go for a scroll to try.</p></div>
      <div class="item">
        1
      </div>
      <div class="item">
        2
      </div>
      <div class="item">
        3
      </div>
      <div class="item">
        4
      </div>
      <div class="item" style="background: white;"><h1>Vue Loop</h1>
        <p>Go for a scroll to try.</p>
      </div>

     <!-- This item is added additionally. -->
      <div class="item">
        1
      </div>
</div>

Playing around with the Vue Loop code a little, I managed to "fix" the issue by removing the +1 here:

makeDuplicates() {
...
     for(var i = 0; i < division + 1; i++) {
              container.appendChild(container.childNodes[i].cloneNode(true));
     }
...

I doubt this is the correct way to resolve this issue. I have not been able to spend a lot of time investing the Vue Loop code logic further, but it seems that it only exists in the Vue-Loop code, and not the original pure JS code.

Am I the only one experiencing this issue?

You may need an appropriate loader to handle this file type.

Hoping for some help if possible! After following readme.md instructions, I'm receiving the following error via terminal:

ERROR in ./node_modules/vue-loop/VueLoop.vue
Module parse failed: Unexpected token (1:0)
You may need an appropriate loader to handle this file type.

<template>
<div class="loop-container" :class="{'full': full, 'horizontal': horizontal}">
<slot></slot>
 @ ./src/js/components/Parallax.js 15:15-34
 @ ./src/js/components ^\.\/.*$
 @ ./src/js/index.js

Here is my webpack.config:

var webpack = require("webpack");
var path = require("path");

var ExtractTextPlugin = require("extract-text-webpack-plugin");
var BrowserSyncPlugin = require('browser-sync-webpack-plugin');

module.exports = {
  entry: {
    "app": "./src/js/index.js",
    "app.min": "./src/js/index.js"
  },

  output: {
    path: __dirname + "/dist/js",
    filename: "[name].js"
  },

  resolve: {
    alias: {
      "assets": path.resolve(__dirname, "assets")
    }
  },

  plugins: [
    // js
    new webpack.optimize.UglifyJsPlugin({
      include: /\.min\.js$/,
      minimize: true
    }),

    // css
    new ExtractTextPlugin({
      filename: "../css/[name].css"
    }),

	// browserSync
	new BrowserSyncPlugin({
      host: 'localhost',
      port: 3000,
	  proxy: 'grub/',
	}),

  ],

  module: {
    rules: [
		
      // js
      {
        test: /\.js$/,
        use: {
          loader: "babel-loader",
          options: {
            presets: ["babel-preset-env"],
            plugins: ["babel-plugin-transform-class-properties"]
          }
        },
      },

      // scss
      {
        test: /\.scss$/,
        use: ExtractTextPlugin.extract({
          fallback: "style-loader",
          use: [
            {
              loader: "css-loader",
              options: {
                minimize: true,
                discardComments: {
                  removeAll: true
                }
              }
            }, {
              loader: "postcss-loader",
              options: {
                plugins: function() {
                  return [
                    require("postcss-import"),
                    require("autoprefixer")
                  ];
                }
              }
            }, {
              loader: "sass-loader"
            }
          ]
        })
      },

      // images
      {
        test: /\.(jpg|jpeg|gif|png|svg)$/,
        use: {
          loader: "url-loader"
        }
      },

      // fonts
      {
        test: /\.(ttf|eot|woff|woff2)$/,
        use: {
          loader: "url-loader"
        }
      }
    ]
  },
  watch: true
}

and package.json:

  "dependencies": {
    "babel-plugin-transform-class-properties": "^6.24.1",
    "basicscroll": "^1.2.0",
    "blazy": "^1.8.2",
    "jquery": "3.2.1",
    "jquery-ui": "^1.12.1",
    "node-sass": "^4.7.2",
    "skrollr": "^0.6.26",
    "url-loader": "^0.6.2",
    "vue": "^2.5.13",
    "vue-loader": "^13.0.0",
    "vue-loop": "^0.2.6"
  }
}

Much appriciated!

Opening the Chrome devtools breaks the horizontal demo

If I open the devtools on the horizontal demo page, it no longer loops around even after I close the devtools.

I'm guessing it doesn't know how to deal with changing window resolutions.

It's worth noting that I have an ultrawide monitor with a 21:9 aspect ratio, so that might be part of the issue.

Display resolution: 3440x1440
Chrome version 58.0.3029.96 (64-bit)
Windows 10 64-bit

nuxt

Hello!

Thanks for this, is brilliant โ€“ I recently tried to integrate in a nuxt.js app but am unsure how to do so. Have you done so?

Thanks,

Change the resize event listener technique

You should use addEventListener for the resize event as it supports an infinite amount of listeners. The problem with onresize is that it's the inline technique and only supports one handler, which makes it easily overwritable since window is global ๐Ÿ‘

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.