@unumux/ux-column-select
An Angular module to scroll to a column.
Last updated 5 years ago by unumux .
ISC · Original npm · Tarball · package.json
$ cnpm install @unumux/ux-column-select 
SYNC missed versions from official npm registry.

ux-column-select

An Angular module to scroll to a column.

Installation

This module currently only works with Browserify. To install:

npm install --save @unumux/ux-column-select

Then include it in your Angular project by inserting the dependency in your app

var app = angular.module("app", [require("@unumux/ux-column-select")]);

Usage

This module provides two directives, ux-column-select and ux-column-select-controls.

ux-column-select

The ux-column-select directive should be used on the container of your columns. The columns should be direct children of the container, and the container should have a set width and overflow: scroll; or overflow: auto on it.

Example:

<div class="container" ux-column-select>
    <div class="column"></div>
    <div class="column"></div>
    <div class="column"></div>
    <div class="column"></div>
    <div class="column"></div>
</div>
.container {
    width: 400px;
    white-space: nowrap;
    overflow: auto;
}

.column {
    width: 200px;
    white-space: normal;
    display: inline-block;
}

ux-column-select-controls

This directive should be on the container for the controls. It provides 2 scope variables and 2 scope functions. The scope variables are previousDisabled and nextDisabled, and can be used with ng-disabled to control the disabled state. The 2 scope functions are onNext and onPrevious, and should be used with ng-click to change the active column.

Example:

<div ux-column-select-controls>
    <button ng-click="onPrevious()" ng-disabled="previousDisabled">Previous</button>
    <button ng-click="onNext()" ng-disabled="nextDisabled">Next</button>
</div>

Development

Unit tests can be run with npm test.

Current Tags

  • 1.1.1                                ...           latest (5 years ago)

5 Versions

  • 1.1.1                                ...           5 years ago
  • 1.1.0                                ...           5 years ago
  • 1.0.2                                ...           5 years ago
  • 1.0.1                                ...           5 years ago
  • 1.0.0                                ...           5 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 2
Last Day 0
Last Week 0
Last Month 0
Dependencies (1)
Dev Dependencies (24)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |