Git Product home page Git Product logo

almostjs-joint's Introduction

almostjs-joint

ALMOsT is an AgiLe MOdel Transformation framework for JavaScript

NPM Version MIT licensed

ALMOsT_Joint is an opinionated plug-in for JointJs which facilitates the development of Model Editors.

ALMOsT_Joint is built on top of JointJs concepts like:

  • Graph: the structure of the diagram see
  • Cell: a component of the diagram see
  • Element: a Cell with position, size and a graphical representation see
  • Link: a Cell with a line-ish graphical representation (line, arrow, ...) connecting two elements see

It just adds the concept of Board, an abstraction over the Paper concept in JoinJs which provides you a set of functionalities out of the box.

The minimum required code is the following:

var model = new joint.dia.Graph(),
var board = almost.plugins.joint.createBoard({
    el: '#board',
    model: model
});

This will create a Graph and initialize a board.

The createBoard constructor function has the following options:

  • el: [dom node, jquery collection, a jquery selector string] the dom element in the page where the board will be created.
  • model: [joint.dia.Graph] the Graph which contains the displayed diagram.
  • optional isValidParent: [function (elementView, parentElementView)] a function which validates the parent/child relationship between elements, a negative response will reject the previous operation by the user. The parent can be undefined if the element is in a free area of the Board, at least one element must have no parent.
  • optional defaultLink: [function (elementView, magnet)] this function serves the same functionality as the JointJs counterpart.

almostjs-joint's People

Contributors

b3rn475 avatar emanuele-falzone avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

almostjs-joint's Issues

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.