Git Product home page Git Product logo

layout-base's Introduction

layout-base

Description

This repository implements a basic layout model and some utilities for Cytoscape.js layout extensions.

Usage instructions

Add layout-base as a dependecy to your layout extension.

require() in the extension to reach functionality:

  • var Integer = require(layout-base).Integer,
  • var Layout = require(layout-base).Layout,
  • ...

For a usage example, see cose-base or avsdf-base.

layout-base's People

Contributors

alihanokka avatar dorukcakmakci avatar hasanbalci avatar herencalik avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

layout-base's Issues

Miscalculation of compound bounds when labels are included

It seems like the bound update of compound nodes during iterations are not calculated correctly, when NODE_DIMENSIONS_INCLUDE_LABELS constant are set to true. The layout extensions like cose-bilkent and fcose also give label width and height incorrectly to the layout-base. A few buggy examples on a test over cose-bilkent layout:
label_false1
label_false2

Per-element values, specified by functions

Some of the layout options should be able to be specified on a per-element basis, rather than a graph-wide basis. For example, the edge length should be able to be specified as a function(edge) : double in order to create an edge-weighted result (i.e. the edge length varies by score).

I think that this feature may have existed before in COSE, but it may have been lost during the refactoring into layout-base and cose-base.

The following options should allow for functions:

  • nodeRepulsion : function(node) : double
  • idealEdgeLength : function(edge) : double
  • edgeElasticity : function(edge) : double

What are your thoughts, @ugurdogrusoz?

I assume that making the change within this project would enable the function options within any of the COSE family of layouts, which is why I'm filing the issue here.

I'm tagging @chrtannus, as he's interested in this topic.

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.