Skip to content

Commit

Permalink
Small formatting fixes + changing where the vertical class is added +…
Browse files Browse the repository at this point in the history
… removing useless variables
  • Loading branch information
sdrdis committed Dec 19, 2019
1 parent a90e2b0 commit 1849f0b
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 27 deletions.
28 changes: 9 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,6 @@ Here are the main functionalities provided so far:
* Operators and links can be customized using CSS and the plugin parameters.
* Some methods allow you to add advanced functionalities, such as a panzoom view or adding operators using drag and drop. Take a look at the [advanced demo](http://sebastien.drouyer.com/jquery.flowchart-demo/#advanced).

Implementations
---------------

This project repository is the latest version os jquery.flowchart with improvements made by community users. The implementations made are:
* [@zhangbg](https://github.com/zhangbg/jquery.flowchart) - Fixed compatibility in IE9 & IE10;
* [@zhangbg](https://github.com/zhangbg/jquery.flowchart) - Fixed compatibility in IE11;
* [@Elvaron](https://github.com/elvaron/jquery.flowchart) - Fixed setOperatorData on operators with ins/outs set to multiple:true;
* [@Elvaron](https://github.com/elvaron/jquery.flowchart) - Added getLinksFrom(operator) and getLinksTo(operator) methods;
* [@ziyiwang](https://github.com/ziyiwang/jquery.flowchart) - Add remove to IE, as IE does not support remove function;
* [@dogbull](https://github.com/dogbull/jquery.flowchart) - Added getDataRef() method;
* [@yaroslav-zenin](https://github.com/yaroslav-zenin/jquery.flowchart) - Switch to use global jQuery scope ("$" conflict with prototype library);
* [@lflfm](https://github.com/lflfm/jquery.flowchart) - Changed demo page to @lflfm sample page (more detailed demo);
* [@lflfm](https://github.com/lflfm/jquery.flowchart) - Removed lint warnings from parseInt and missing semicolons;
* [@lflfm](https://github.com/lflfm/jquery.flowchart) - Fixes the problem with connectors when using operatorTypes;
* [@neoera](https://github.com/neoera/jquery.flowchart) - Multiple sub connector with array support;
* [@dshemendiuk](https://github.com/dshemendiuk/jquery.flowchart) - Support to vertical flowcharts links;
* [@dshemendiuk](https://github.com/dshemendiuk/jquery.flowchart) - Support to HTML body into operators;
* [@ernaniaz](https://github.com/ernaniaz/jquery.flowchart) - Support for multiple input/output connector link per operator.

Context
-------

Expand All @@ -57,6 +38,15 @@ Contributors
* M. Fatih Marabaoğlu - alias [@MFatihMAR](https://github.com/MFatihMAR) - for adding the uncontained parameter and improving the grid system.
* Peter Vavro - alias [@petervavro](https://github.com/petervavro) - for adding mouse events.
* Mike Branham - alias [@Mike-Branham](https://github.com/Mike-Branham) - for bug fixes in the demo page.
* [@zhangbg](https://github.com/zhangbg) - for compatibility with IE9, IE10 and IE11.
* [@elvaron](https://github.com/elvaron) - for bug fixes and adding the getLinksFrom and getLinksTo methods.
* Ziyi Wang - alias [@ziyiwang](https://github.com/ziyiwang) - for bug fixes.
* [@dogbull](https://github.com/dogbull) - for adding the getDataRef method.
* Yaroslav Zenin - alias [@yaroslav-zenin](https://github.com/yaroslav-zenin) - for big fixes.
* [@lflfm](https://github.com/lflfm) - for bug fixes and new demo page.
* [@neoera](https://github.com/neoera) - for adding multiple sub connector with array support.
* Dima Shemendiuk - alias [@dshemendiuk](https://github.com/dshemendiuk) - for adding vertical flowchart support and access to operators's body.
* Ernani Azevedo - alias [@ernaniaz](https://github.com/ernaniaz) - for adding the possibility to decide for each connector if there can be a single link and multiple links and for making the integration of features from the community much easier.

Documentation
-------------
Expand Down
13 changes: 6 additions & 7 deletions jquery.flowchart.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ jQuery(function ($) {
multipleLinksOnOutput: false,
multipleLinksOnInput: false,
linkVerticalDecal: 0,
verticalConnection: 0,
linkCurveYMargin: 100,
verticalConnection: false,
onOperatorSelect: function (operatorId) {
return true;
},
Expand Down Expand Up @@ -89,7 +88,7 @@ jQuery(function ($) {
this.element.addClass('flowchart-container');

if (this.options.verticalConnection) {
$('body').addClass('flowchart-vertical');
this.element.addClass('flowchart-vertical');
}

this.objs.layers.links = $('<svg class="flowchart-links-layer"></svg>');
Expand Down Expand Up @@ -326,8 +325,8 @@ jQuery(function ($) {
var elementOffset = this.element.offset();

var x = (connectorOffset.left - elementOffset.left) / this.positionRatio;
var width = parseInt($connector.css('border-top-width'),10);
var y = (connectorOffset.top - elementOffset.top - 1) / this.positionRatio + parseInt($connector.css('border-left-width'),10);
var width = parseInt($connector.css('border-top-width'), 10);
var y = (connectorOffset.top - elementOffset.top - 1) / this.positionRatio + parseInt($connector.css('border-left-width'), 10);

return {x: x, width: width, y: y};
},
Expand Down Expand Up @@ -692,8 +691,8 @@ jQuery(function ($) {
return;
}
var elementOffset = self.element.offset();
pointerX = (e.pageX - elementOffset.left) / self.positionRatio - parseInt($(e.target).css('left'),10);
pointerY = (e.pageY - elementOffset.top) / self.positionRatio - parseInt($(e.target).css('top'),10);
pointerX = (e.pageX - elementOffset.left) / self.positionRatio - parseInt($(e.target).css('left'), 10);
pointerY = (e.pageY - elementOffset.top) / self.positionRatio - parseInt($(e.target).css('top'), 10);
},
drag: function (e, ui) {
if (self.options.grid) {
Expand Down
Loading

0 comments on commit 1849f0b

Please sign in to comment.