Skip to content

Commit 08fe251

Browse files
committed
implement family tree
1 parent a718307 commit 08fe251

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

dist/js/jquery.orgchart.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,6 @@
278278
},
279279
//
280280
bindPan: function () {
281-
this.unbindPan();
282281
this.$chartContainer.css('overflow', 'hidden');
283282
this.$chart.on('mousedown touchstart', this.panStartHandler);
284283
$(document).on('mouseup touchend', { 'chart': this.$chart }, this.panEndHandler);
@@ -326,7 +325,6 @@
326325
},
327326
//
328327
bindZoom: function () {
329-
this.unbindZoom();
330328
this.$chartContainer.on('wheel', { 'oc': this }, this.zoomWheelHandler);
331329
this.$chartContainer.on('touchstart', { 'oc': this }, this.zoomStartHandler);
332330
$(document).on('touchmove', { 'oc': this }, this.zoomingHandler);
@@ -386,8 +384,8 @@
386384
attachRel: function (data, flags) {
387385
var that = this;
388386
data.relationship = flags + (data.children && data.children.length > 0 ? 1 : 0);
389-
if (this.options?.compact?.constructor === Function ) {
390-
data.compact = this.options.compact(data);
387+
if (this.options?.compact?.constructor === Function && this.options.compact(data)) {
388+
data.compact = true;
391389
}
392390
if (data.children) {
393391
data.children.forEach(function(item) {

0 commit comments

Comments
 (0)