You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Socket
Socket
Sign inDemoInstall

dataslider

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dataslider

view your data according to a slider


Version published
Weekly downloads
0
Maintainers
1
Created
Weekly downloads
 

Readme

Source

dataslider

Use a slider to convoke data-display functions with boundary parameters.

.load(data, function(canvas,data))

Load the panorama with data, and supply a display function that will be passed the canvas and the data.

.setDisplayAddFn(function(canvas,olddata,newdata))

Supply the display function when new data is added to the panorama.

.setAddFn(function(olddata,newdata))

Supply a function that tells dataslider how to add data together. The return value will overwrite the stored data.

.listen(event,type)

Supply an event emitter and the type of event to listen for. When that type is fired, two things happen

  1. the function supplied in setAddFn will trigger
  2. the function supplied in setDisplayAddFn will trigger.

The order of these is settable on invocation, but defaults to the above order. If addFn happens first, then old data in setDisplayFn will be the old + new data, and the newdata will simply be provided for reference.

.onchange(function(params))

Supply a function that will recieve a params s.t.

params : { pos : { left : 20, right:40 }, type : drag }
// type will either be a drag or resize.

.setImages(images)

Supply an image list with image objects, where each image object is the native Image object. Each image object should also have a .name property. The following will be used as a lookup table between image objects and how they will be used.

name: selector_left.png -> left selector

name: selector_right.png -> right selector

name: selector_left_hover.png -> left selector on hover

name: selector_right_hover.png -> right selector on hover

name: selector_left_down.png -> left selector on mousedown

name: selector_right_down.png -> right selector on mousedown

Copy Pasta

Since you need to setup these functions, here is some copy paste.

dataslider.to();
dataslider.onchange(function(params) { });
dataslider.setImages(images);
dataslider.load(,function(canvas,data) { });
dataslider.listen(,);    
dataslider.setAddFn(function(old,newdata) {})
dataslider.setDisplayAddFn(function(canvas,old,newdata) { });

Keywords

FAQs

Package last updated on 31 Jan 2013

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc