Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

csc-adv-int-basic-gallery

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

csc-adv-int-basic-gallery

Basic touch enabled image slider

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

Usage

const BasicGallery = require('csc-adv-int-basic-gallery');

document.addEventListener('DOMContentLoaded', () => {
  const base = document.getElementsByClassName('gallery')[0];
  const containerWidth = base.getBoundingClientRect().width;
  // 500 / 375 = containerWidth / X
  const displayHeight = Math.round((containerWidth * 375) / 500);
  base.style.height = "" + displayHeight + "px";
  const gallery = new BasicGallery(base.getElementsByClassName('full-images')[0]);
}, false);

Public Methods

/**
 * @param {!Element} container
 * @param {{
 *     startSlide: (number|undefined),
 *     continuous: (boolean|undefined),
 *     speed: (number|undefined)
 *   }=} options
 */
constructor(container, options) { }

/** 
 * Advance to the next image
 */
next() { }

/** 
 * Advance to the previous image
 */
prev() { }

/**
 * A simple positive modulo using this.slides.length
 *
 * @param {number} index
 * @return {number}
 */
wrapIndex(index) { }

/**
 * @param {number} destinationIndex
 * @param {number=} slideSpeed
 * @param {boolean=} ignoreWrap
 */
slide(destinationIndex, slideSpeed, ignoreWrap) {}

/**
 * @param {number} index
 * @param {number} offset
 * @param {number=} delay in milliseconds
 */
resetSlide(index, offset, delay) {}

/*
* Called whenever the slide index is changed. Override in derived classes
* to add specific handling.
*/
slideChanged() {};

FAQs

Package last updated on 08 Feb 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc