-
Notifications
You must be signed in to change notification settings - Fork 775
Description
You will notice that the horizontal line between spouses do not work (works with jqeury v3.x.y) . I did not create a fork for this as I understand that making all backwards compatible does not please the eye. Still, for all of us that still stick to an older jquery version, here is what you need to do:
in jquery.orgchart.js loook for: "--ft"
if (i === 0) { $wrapper.css({'--ft-width': '50%', '--ft-left-offset': '50%'}); } else if (i > 0 && i < _this.length - 1) { $wrapper.css({'--ft-width': '100%', '--ft-left-offset': '0px'}); } else { $wrapper.css({'--ft-width': '50%', '--ft-left-offset': '0px'}); }
the code to make this compatible would be:
if (i === 0) { $wrapper[0].style.setProperty('--ft-width', '50%'); $wrapper[0].style.setProperty('--ft-left-offset', '50%'); } else if (i > 0 && i < _this.length - 1) { $wrapper[0].style.setProperty('--ft-width', '100%'); $wrapper[0].style.setProperty('--ft-left-offset', '0px'); } else { $wrapper[0].style.setProperty('--ft-width', '50%'); $wrapper[0].style.setProperty('--ft-left-offset', '0px'); }
Thanks for the great work Dabeng ! (I will leave the issue open, but please feel free to just close it).