How to use freezeframe - 3 common examples

To help you get started, we’ve selected a few freezeframe examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ctrl-freaks / freezeframe.js / packages / vue-freezeframe / src / components / Freezeframe.vue View on Github external
mounted() {
    if (this.$slots.default) {
      this.$freezeframe = new Freezeframe(this.$el, this.options);
    } else if (this.src) {
      this.$freezeframe = new Freezeframe(this.$refs.img, this.options);
    }
    this.addEventListeners();
  },
  methods: {
github ctrl-freaks / freezeframe.js / packages / vue-freezeframe / src / components / Freezeframe.vue View on Github external
mounted() {
    if (this.$slots.default) {
      this.$freezeframe = new Freezeframe(this.$el, this.options);
    } else if (this.src) {
      this.$freezeframe = new Freezeframe(this.$refs.img, this.options);
    }
    this.addEventListeners();
  },
  methods: {
github ctrl-freaks / freezeframe.js / packages / react-freezeframe / src / components / ReactFreezeframe.js View on Github external
componentDidMount() {
    this.$freezeframe = new Freezeframe(this.freeze.current, this.props.options);
    this.$freezeframe.on('toggle', (items, isPlaying) => {
      const event = isPlaying ? 'Start' : 'Stop';
      if (this.props[`on${event}`] instanceof Function) {
        this.props[`on${event}`](items, isPlaying);
      }
      if (this.props.onToggle instanceof Function) {
        this.props.onToggle(items, isPlaying);
      }
    });
  }

freezeframe

Freezeframe is a library that automatically pauses animated .gifs and enables them to start animation on mouse hover or click

MIT
Latest version published 4 years ago

Package Health Score

53 / 100
Full package analysis

Popular freezeframe functions