open-index/open-npm huggingface dataset:
npm package: @js4cytoscape/cyannotation-cx2js
Description: Renders Cytoscape Desktop annotations from CX files via cytoscape.js-canvas
Latest version: 0.8.7-alpha.6

# cx-annotation2js

Convert Cytoscape Desktop Annotations to cytoscape.js.

Builds off of [cytoscape-canvas](https://github.com/classcraft/cytoscape.js-canvas). A cytoscape.js extension to render a canvas over/under a Cytoscape.js graph.

## Run targets

- `npm run build` : build project
- `npm run build-prod` : build the project for production
- `npm run clean` : clean the project
- `npm run watch` : watch mode (debug mode enabled, autorebuild, autoreload)
- `npm test` : run tests
- `npm run lint` : lint the project

## Testing

All files `/test` will be run by [Mocha](https://mochajs.org/). You can `npm test` to run all tests, or you can run `mocha -g specific-test-name` (prerequisite: `npm install -g mocha`) to run specific tests.

[Chai](http://chaijs.com/) is included to make the tests easier to read and write.

## Publishing a release

1. Make sure the tests are passing: `npm test`
1. Make sure the linting is passing: `npm run lint`
1. Bump the version number with `npm version`, in accordance with [semver](http://semver.org/). The `version` command in `npm` updates both `package.json` and git tags, but note that it uses a `v` prefix on the tags (e.g. `v1.2.3`).
1. For a bug fix / patch release, run `npm version patch`.
1. For a new feature release, run `npm version minor`.
1. For a breaking API change, run `npm version major.`
1. For a specific version number (e.g. 1.2.3), run `npm version 1.2.3`.
1. Push the release: `git push origin --tags`
1. Publish to npm: `npm publish .`
npm package: @js4y/lock-scroll
Description: A set of methods to lock scrolling within an element or an entire page on mobile devices, tablets and desktops.
Author: David Bukacek
Latest version: 1.1.4

# Lock scroll

<p>
    <a href="https://www.npmjs.com/package/@js4y/lock-scroll"><img src="https://img.shields.io/badge/dependencies-none-green.svg" alt="none dependencies"></a>
    <a href="https://www.npmjs.com/package/@js4y/lock-scroll"><img src="https://img.shields.io/npm/v/%40js4y%2Flock-scroll" alt="npm"></a>
    <a href="https://www.npmjs.com/package/@js4y/lock-scroll"><img src="https://deno.bundlejs.com/badge?q=@js4y/lock-scroll&treeshake=[*]" alt="npm bundle size"></a>
    <a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/npm/l/%40js4y%2Flock-scroll" alt="license"></a>
</p>

A set of methods to lock scrolling within an element or an entire page on mobile devices, tablets and desktops.

Live Demo: https://bukacekd.github.io/lock-scroll

## Features

- [easy to use](#usage)
- compatible with Android, IOS, MacOS and Windows
- compatible with mobile devices, tablets and desktops
- preserves the space corresponding to the width of the scrollbar

## Installation

Npm

```bash
npm install @js4y/lock-scroll
```

CDN

```bash
<script src="https://unpkg.com/@js4y/lock-scroll/dist/index.js"></script>
```

## Usage

Npm

```javascript
import {lockScroll, unlockScroll} from '@js4y/lock-scroll';

// lock scrolling
lockScroll();
// unlock scrolling
unlockScroll();
```

CDN

```javascript
<script src="https://unpkg.com/@js4y/lock-scroll/dist/index.js"></script>

<script>
    // lock scrolling
    js4y.scrolling.lockScroll();
    // unlock scrolling
    js4y.scrolling.unlockScroll();
<script>
```

## Methods

### lockScroll(target?: HTMLElement): void

Lock scrolling within an element or an entire page.

```javascript
// lock page scrolling
lockScroll();

// lock scrolling for specific element
lockScroll(document.getElementById('scrollable-element'));
```

### unlockScroll(target?: HTMLElement): void

Unlock scrolling within an element or an entire page.

```javascript
// unlock page scrolling
unlockScroll();

// unlock scrolling for specific element
unlockScroll(document.getElementById('scrollable-element'));
```

## Browser support

| ![alt chrome](images/chrome.png) | ![alt edge](images/edge.png)  | ![alt firefox](images/firefox.png)  | ![alt opera](images/opera.png) | ![alt safari](images/safari.png) |
| :-: | :-: | :-: | :-: | :-: |
| Chrome 69+ | Edge 79+ | Firefox 41+ | Opera 56+ | Safari 12.1+ |

## License

The project is licensed under [MIT license](https://opensource.org/license/mit/).

## Related

- [CountUp](https://github.com/bukacekd/count-up) - A tiny dependency-free JavaSript library for animating numeric values.
- [Dialog](https://github.com/bukacekd/dialog) - A tiny dependency-free JavaSript ES6 library built on a dialog element with minimal configuration.
- [Loader](https://github.com/bukacekd/loader) - A tiny dependency-free javascript loading spinner component with minimal configuration.