Skip to content

Commit

Permalink
Merge pull request #124 from AlexKapustin/#123
Browse files Browse the repository at this point in the history
Added method to return client rect #123
  • Loading branch information
sdrdis committed May 8, 2020
2 parents 1849f0b + b24b947 commit 2290bdc
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions jquery.flowchart.js
Original file line number Diff line number Diff line change
Expand Up @@ -1103,6 +1103,22 @@ jQuery(function ($) {
this.redrawLinksLayer();
this.callbackEvent('afterChange', ['operator_data_change']);
},

getBoundingOperatorRect: function (operatorId) {
if (!this.data.operators[operatorId]) {
return null;
}

var elOperator = this.data.operators[operatorId].internal.els.operator;
var operator = this.data.operators[operatorId];

return {
'left': operator.left,
'top': operator.top,
'width': elOperator.width(),
'height': elOperator.height(),
};
},

doesOperatorExists: function (operatorId) {
return typeof this.data.operators[operatorId] != 'undefined';
Expand Down

0 comments on commit 2290bdc

Please sign in to comment.