Coder Social home page Coder Social logo

vue-check-view's People

Contributors

coreycoburn avatar vtimofeev 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

vue-check-view's Issues

vue-check-view does not trigger if height of div is 0

Version:

"vue-check-view": "^0.3.0"

Steps to reproduce:

  1. Render the code below in your component:
<template>
  <div v-view.once="onceHandler" class="wrapper">
    <div v-if="data" class="content">
    </div>
  </div>
</template>

<script>
  export default {
    name: 'test-component',
    data() {
      return {
        data: undefined,
      }
    },
    methods: {
      onceHandler() {
        console.log('onceHandler')
      },
    },
  }
</script>

โŒ Actual result:
vue-check-view does not trigger: classes in the dom are not updated and onceHandler is not called.

โœ… Expected result:
vue-check-view is triggering.


if I try this workaround:

<style lang="scss">
  .wrapper {
      min-height: 1px;
  }
</style>

it starts working. But IMO it should work without this workaround even when the target div height is 0.

Starting animations

Hi, thanks for the great script, I was trying to use it to start animations like translateX, but could please help me out, what is the best way to animate and keep it active until is out of the viewport, I tried the .view-in but it turns to view-out sometimes

https://codepen.io/nam_co/pen/gOpRwbP

Appreciate the help

Not transpilable code

This module gives problems with IE11 due to its use of ES6 features. It should be made retro-compatible with older ES versions.

Typescript : Uncaught TypeError: Cannot read property '$isServer' of undefined

I success declare the js plugin with *.d.ts, but after I do .use(checkView), my view is blank, did this library support on Typescript?

main.ts file

import checkView from 'vue-check-view'
....
createApp(App).use(store).use(router).use(checkView).component('font-awesome-icon', FontAwesomeIcon).mount('#app')

*.d.ts file

declare module "vue-check-view"; any;

viewHandler params

Hi.. is it possible to add the functionality to pass extra params into viewHandler alongside with the event?
eg v-view="viewHandler($event,message)"

Function only called once at beginning of created page

i have a component like this

<div class="background-footer" style="z-index: 1" v-view="handleScroll">
 <!-- content -->
</div>

and my script function only do console.log().

Why is it only trigger once instead of every time i scroll down the screen ?
Not like how it works in demo, every time i scroll down, the component updating its view property

When e.target is bigger than viewport...

So I have an element target which is bigger than viewport size,
and
viewHandler(e) fires exit from element before it actually leaves the viewport
here is the printscreen of console.log
image

I think this is because element is bigger and then something trippy happens to percent in view
image

Its not a big issue but I think its worth fixing and making this plugin SUPERAWESOME!
Anyway thanks for even making this, it really saved me the time

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.