Giter VIP home page Giter VIP logo

cytoscape-dblclick's Introduction

cytoscape-dblclick

Description

Add dblclick event (demo)

Dependencies

  • Cytoscape.js ^3.2.0

Usage instructions

Download the library:

  • via npm: npm install cytoscape-dblclick,
  • via unpkg: https://unpkg.com/cytoscape-dblclick/dist/index.js

Import the library as appropriate for your project:

ES import:

import cytoscape from 'cytoscape';
import dblclick from 'cytoscape-dblclick';

cytoscape.use( dblclick );

CommonJS require:

let cytoscape = require('cytoscape');
let dblclick = require('cytoscape-dblclick');

cytoscape.use( dblclick ); // register extension

AMD:

require(['cytoscape', 'cytoscape-dblclick'], function( cytoscape, dblclick ){
  dblclick( cytoscape ); // register extension
});

Plain HTML/JS has the extension registered for you automatically, because no require() is needed.

API

// With default interval (500ms)
cy.dblclick();

// Specify interval (in milliseconds)
const interval = 300;
cy.dblclick(interval);

Events

  • dblclick : Emitted when two click has emitted within the interval (default: 500 ms)
  • dblclick:timeout: Emitted when the internal timer has timed-out. Useful to detect a single click

Build targets

  • npm run build : Build ./src/** into dist/index.js
  • npm run lint : Run eslint on the source

Publishing instructions

This project is set up to automatically be published to npm and bower. To publish:

  1. Build the extension : npm run build
  2. Commit the build : git commit -am "Build for release"
  3. Bump the version number and tag: npm version major|minor|patch
  4. Push to origin: git push && git push --tags
  5. Publish to npm: npm publish .

cytoscape-dblclick's People

Contributors

lambdalisue avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

uday-bhardwaj

cytoscape-dblclick's Issues

use dblclick event on multiple selector

Hello, I need to trigger dblclick event on multiple selector : node with different className.
The dbl clic event is still triggered on classes that are not in the selector of the event.
Here is my code:
cy.on('dblclick','.iponimiaDBClick,.iponimia,.meronimiaDBClick,.meronimia,.sinonimiaDBClick,.sinonimia'
, function (event) {
....
}

I need to trigger dblclick on nodes that have ONLY the className written in the selector space (.iponimia, iponimiaDBClick etc)

Thank you

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.