Skip to content

Commit

Permalink
implement family tree
Browse files Browse the repository at this point in the history
  • Loading branch information
dabeng committed Dec 14, 2024
1 parent a718307 commit 08fe251
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions dist/js/jquery.orgchart.js
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,6 @@
},
//
bindPan: function () {
this.unbindPan();
this.$chartContainer.css('overflow', 'hidden');
this.$chart.on('mousedown touchstart', this.panStartHandler);
$(document).on('mouseup touchend', { 'chart': this.$chart }, this.panEndHandler);
Expand Down Expand Up @@ -326,7 +325,6 @@
},
//
bindZoom: function () {
this.unbindZoom();
this.$chartContainer.on('wheel', { 'oc': this }, this.zoomWheelHandler);
this.$chartContainer.on('touchstart', { 'oc': this }, this.zoomStartHandler);
$(document).on('touchmove', { 'oc': this }, this.zoomingHandler);
Expand Down Expand Up @@ -386,8 +384,8 @@
attachRel: function (data, flags) {
var that = this;
data.relationship = flags + (data.children && data.children.length > 0 ? 1 : 0);
if (this.options?.compact?.constructor === Function ) {
data.compact = this.options.compact(data);
if (this.options?.compact?.constructor === Function && this.options.compact(data)) {
data.compact = true;
}
if (data.children) {
data.children.forEach(function(item) {
Expand Down

0 comments on commit 08fe251

Please sign in to comment.