From 482b3f365be0b7af53a5d5b4d37a26f127b8a11d Mon Sep 17 00:00:00 2001 From: dabeng Date: Tue, 14 Aug 2018 10:29:16 +0800 Subject: [PATCH] fix-bug: drag & drop not working on Firefox --- bower.json | 2 +- demo/js/jquery.orgchart.js | 11 +++++------ dist/js/jquery.orgchart.js | 11 +++++------ dist/js/jquery.orgchart.min.js | 2 +- dist/js/jquery.orgchart.min.js.map | 2 +- package.json | 2 +- src/js/jquery.orgchart.js | 11 +++++------ 7 files changed, 19 insertions(+), 22 deletions(-) diff --git a/bower.json b/bower.json index 266de614..176f1d05 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "orgchart", - "version": "2.1.2", + "version": "2.1.3", "homepage": "https://github.com/dabeng/OrgChart", "authors": [ "dabeng " diff --git a/demo/js/jquery.orgchart.js b/demo/js/jquery.orgchart.js index 10fdbee8..2b41bd41 100644 --- a/demo/js/jquery.orgchart.js +++ b/demo/js/jquery.orgchart.js @@ -892,9 +892,6 @@ var opts = this.options; var origEvent = event.originalEvent; var isFirefox = /firefox/.test(window.navigator.userAgent.toLowerCase()); - if (isFirefox) { - origEvent.dataTransfer.setData('text/html', 'hack for firefox'); - } var ghostNode, nodeCover; if (!document.querySelector('.ghost-node')) { ghostNode = document.createElementNS("http://www.w3.org/2000/svg", "svg"); @@ -907,9 +904,10 @@ nodeCover = $(ghostNode).children().get(0); } var transValues = $nodeDiv.closest('.orgchart').css('transform').split(','); - var scale = Math.abs(window.parseFloat((opts.direction === 't2b' || opts.direction === 'b2t') ? transValues[0].slice(transValues[0].indexOf('(') + 1) : transValues[1])); - ghostNode.setAttribute('width', $nodeDiv.outerWidth(false)); - ghostNode.setAttribute('height', $nodeDiv.outerHeight(false)); + var isHorizontal = opts.direction === 't2b' || opts.direction === 'b2t'; + var scale = Math.abs(window.parseFloat(isHorizontal ? transValues[0].slice(transValues[0].indexOf('(') + 1) : transValues[1])); + ghostNode.setAttribute('width', isHorizontal ? $nodeDiv.outerWidth(false) : $nodeDiv.outerHeight(false)); + ghostNode.setAttribute('height', isHorizontal ? $nodeDiv.outerHeight(false) : $nodeDiv.outerWidth(false)); nodeCover.setAttribute('x',5 * scale); nodeCover.setAttribute('y',5 * scale); nodeCover.setAttribute('width', 120 * scale); @@ -959,6 +957,7 @@ }, // dragstartHandler: function (event) { + event.originalEvent.dataTransfer.setData('text/html', 'hack for firefox'); // if users enable zoom or direction options if (this.$chart.css('transform') !== 'none') { this.createGhostNode(event); diff --git a/dist/js/jquery.orgchart.js b/dist/js/jquery.orgchart.js index 10fdbee8..2b41bd41 100644 --- a/dist/js/jquery.orgchart.js +++ b/dist/js/jquery.orgchart.js @@ -892,9 +892,6 @@ var opts = this.options; var origEvent = event.originalEvent; var isFirefox = /firefox/.test(window.navigator.userAgent.toLowerCase()); - if (isFirefox) { - origEvent.dataTransfer.setData('text/html', 'hack for firefox'); - } var ghostNode, nodeCover; if (!document.querySelector('.ghost-node')) { ghostNode = document.createElementNS("http://www.w3.org/2000/svg", "svg"); @@ -907,9 +904,10 @@ nodeCover = $(ghostNode).children().get(0); } var transValues = $nodeDiv.closest('.orgchart').css('transform').split(','); - var scale = Math.abs(window.parseFloat((opts.direction === 't2b' || opts.direction === 'b2t') ? transValues[0].slice(transValues[0].indexOf('(') + 1) : transValues[1])); - ghostNode.setAttribute('width', $nodeDiv.outerWidth(false)); - ghostNode.setAttribute('height', $nodeDiv.outerHeight(false)); + var isHorizontal = opts.direction === 't2b' || opts.direction === 'b2t'; + var scale = Math.abs(window.parseFloat(isHorizontal ? transValues[0].slice(transValues[0].indexOf('(') + 1) : transValues[1])); + ghostNode.setAttribute('width', isHorizontal ? $nodeDiv.outerWidth(false) : $nodeDiv.outerHeight(false)); + ghostNode.setAttribute('height', isHorizontal ? $nodeDiv.outerHeight(false) : $nodeDiv.outerWidth(false)); nodeCover.setAttribute('x',5 * scale); nodeCover.setAttribute('y',5 * scale); nodeCover.setAttribute('width', 120 * scale); @@ -959,6 +957,7 @@ }, // dragstartHandler: function (event) { + event.originalEvent.dataTransfer.setData('text/html', 'hack for firefox'); // if users enable zoom or direction options if (this.$chart.css('transform') !== 'none') { this.createGhostNode(event); diff --git a/dist/js/jquery.orgchart.min.js b/dist/js/jquery.orgchart.min.js index 4f781aec..3c59e28b 100644 --- a/dist/js/jquery.orgchart.min.js +++ b/dist/js/jquery.orgchart.min.js @@ -1,2 +1,2 @@ -"use strict";!function(e){"object"==typeof module&&"object"==typeof module.exports?e(require("jquery"),window,document):e(jQuery,window,document)}(function(v,g,p,e){var t=function(e,t){this.$chartContainer=v(e),this.opts=t,this.defaultOptions={nodeTitle:"name",nodeId:"id",toggleSiblingsResp:!1,visibleLevel:999,chartClass:"",exportButton:!1,exportFilename:"OrgChart",exportFileextension:"png",parentNodeSymbol:"fa-users",draggable:!1,direction:"t2b",pan:!1,zoom:!1,zoominLimit:7,zoomoutLimit:.5}};t.prototype={init:function(e){var n=this;this.options=v.extend({},this.defaultOptions,this.opts,e);var t=this.$chartContainer;this.$chart&&this.$chart.remove();var i=this.options.data,s=this.$chart=v("
",{data:{options:this.options},class:"orgchart"+(""!==this.options.chartClass?" "+this.options.chartClass:"")+("t2b"!==this.options.direction?" "+this.options.direction:""),click:function(e){v(e.target).closest(".node").length||s.find(".node.focused").removeClass("focused")}});return"undefined"!=typeof MutationObserver&&this.triggerInitEvent(),"object"===v.type(i)?i instanceof v?this.buildHierarchy(s,this.buildJsonDS(i.children()),0,this.options):this.buildHierarchy(s,this.options.ajaxURL?i:this.attachRel(i,"00")):(s.append(''),v.ajax({url:i,dataType:"json"}).done(function(e,t,i){n.buildHierarchy(s,n.options.ajaxURL?e:n.attachRel(e,"00"),0,n.options)}).fail(function(e,t,i){console.log(i)}).always(function(){s.children(".spinner").remove()})),t.append(s),this.options.exportButton&&!t.find(".oc-export-btn").length&&this.attachExportButton(),this.options.pan&&this.bindPan(),this.options.zoom&&this.bindZoom(),this},triggerInitEvent:function(){var s=this,a=new MutationObserver(function(e){a.disconnect();e:for(var t=0;t",{class:"oc-export-btn"+(""!==this.options.chartClass?" "+this.options.chartClass:""),text:"Export",click:function(e){e.preventDefault(),t.export()}});this.$chartContainer.append(e)},setOptions:function(e,t){return"string"==typeof e&&("pan"===e&&(t?this.bindPan():this.unbindPan()),"zoom"===e&&(t?this.bindZoom():this.unbindZoom())),"object"==typeof e&&(e.data?this.init(e):(void 0!==e.pan&&(e.pan?this.bindPan():this.unbindPan()),void 0!==e.zoom&&(e.zoom?this.bindZoom():this.unbindZoom()))),this},panStartHandler:function(e){var a=v(e.delegateTarget);if(v(e.target).closest(".node").length||e.touches&&1i.zoomoutLimit&&ai.zoomoutLimit&&a').children().not(".spinner").css("opacity",.2),t.data("inAjax",!0),v(".oc-export-btn"+(""!==this.options.chartClass?"."+this.options.chartClass:"")).prop("disabled",!0),!0)},endLoading:function(e){var t=e.parent();e.removeClass("hidden"),t.find(".spinner").remove(),t.children().removeAttr("style"),this.$chart.data("inAjax",!1),v(".oc-export-btn"+(""!==this.options.chartClass?"."+this.options.chartClass:"")).prop("disabled",!1)},isInAction:function(e){return-1';t.closest("tr").next().addBack().children().attr("colspan",a),i.find(".horizontalEdge").length||i.append(o),t.closest("tr").siblings().eq(1).children(":last").before('').end().next().append(i.closest("table").parent());var d=i.closest("table").parent().siblings().find(".node:first");1===d.length&&d.append(o)}else t.append('').parent().attr("colspan",2).parent().after('
').siblings(":last").append(i.find(".horizontalEdge").remove().end().closest("table").parent());var r=parseInt(n.attr("colspan"));if(2").addClass("node "+(i.className||"")+(t>e.visibleLevel?" slide-up":""));e.nodeTemplate?n.append(e.nodeTemplate(i)):n.append('
'+i[e.nodeTitle]+"
").append(void 0!==e.nodeContent?'
'+(i[e.nodeContent]||"")+"
":"");var s=v.extend({},i);delete s.children,n.data("nodeData",s);var a=i.relationship||"";if(e.verticalLevel&&t>=e.verticalLevel){if(t+1>e.verticalLevel&&Number(a.substr(2,1))){var o=t+1>e.visibleLevel?"plus":"minus";n.append('')}}else Number(a.substr(0,1))&&n.append(''),Number(a.substr(1,1))&&n.append(''),Number(a.substr(2,1))&&n.append('').children(".title").prepend('');return n.on("mouseenter mouseleave",this.nodeEnterLeaveHandler.bind(this)),n.on("click",this.nodeClickHandler.bind(this)),n.on("click",".topEdge",this.topEdgeClickHandler.bind(this)),n.on("click",".bottomEdge",this.bottomEdgeClickHandler.bind(this)),n.on("click",".leftEdge, .rightEdge",this.hEdgeClickHandler.bind(this)),n.on("click",".toggleBtn",this.toggleVNodes.bind(this)),e.draggable&&(this.bindDragDrop(n),this.touchHandled=!1,this.touchMoved=!1,this.touchTargetNode=null),e.createNode&&e.createNode(n,i),n},buildHierarchy:function(e,t){var i=this,n=this.options,s=0;s=t.level?t.level:t.level=e.parentsUntil(".orgchart",".nodes").length+1;var a,o=t.children,d=!!o&&o.length;if(2=n.verticalLevel?e.append(r):(a=v(""),e.append(a.append(v("").append(v("").append(r)))))}if(d){var l,h=s+1>n.visibleLevel||t.collapsed?" hidden":"",c=!!(n.verticalLevel&&s+1>=n.verticalLevel);if(c)l=v("
    "),h&&s+1>n.verticalLevel&&l.addClass(h),s+1===n.verticalLevel?e.children("table").append('
').find(".verticalNodes").children().append(l):e.append(l);else{for(var g=v(''),p='',f=1;f';p+='',l=v(''),2===Object.keys(t).length?e.append(g).append(p).append(l):a.append(g).append(p).append(l)}v.each(o,function(){var e=v(c?"
  • ":'
  • ');l.append(e),this.level=s+1,i.buildHierarchy(e,this)})}},buildChildNode:function(e,t){e.find("td:first").attr("colspan",2*t.length),this.buildHierarchy(e,{children:t})},addChildren:function(e,t){this.buildChildNode(e.closest("table"),t),e.children(".bottomEdge").length||e.append(''),e.find(".symbol").length||e.children(".title").prepend(''),this.isInAction(e)&&this.switchVerticalArrow(e.children(".bottomEdge"))},buildParentNode:function(e,t){t.relationship=t.relationship||"001";var i=v("").append(v("").append(v('').append('');this.$chart.prepend(i).children("table:first").append('').children("tr:last").children().append(this.$chart.children("table").last())},addParent:function(e,t){this.buildParentNode(e,t),e.children(".topEdge").length||e.children(".title").after(''),this.isInAction(e)&&this.switchVerticalArrow(e.children(".topEdge"))},complementLine:function(e,t,i){for(var n="",s=0;s';e.parent().prevAll("tr:gt(0)").children().attr("colspan",2*t).end().next().children(":first").after(n)},buildSiblingNode:function(e,t){var i=v.isArray(t)?t.length:t.children.length,n=e.parent().is("td")?e.closest("tr").children().length:1,s=n+i,a=1').append(e)),s,1)},addSiblings:function(e,t){this.buildSiblingNode(e.closest("table"),t),e.closest(".nodes").data("siblingsLoaded",!0),e.children(".leftEdge").length||e.children(".topEdge").after(''),this.isInAction(e)&&(this.switchHorizontalArrow(e),e.children(".topEdge").removeClass("fa-chevron-up").addClass("fa-chevron-down"))},removeNodes:function(e){var t=e.closest("table").parent(),i=t.parent().siblings();t.is("td")?this.getNodeState(e,"siblings").exist?(i.eq(2).children(".topLine:lt(2)").remove(),i.slice(0,2).children().attr("colspan",i.eq(2).children().length),t.remove()):i.eq(0).children().removeAttr("colspan").find(".bottomEdge").remove().end().end().siblings().remove():t.add(t.siblings()).remove()},export:function(r,l){var h=this;if(r=void 0!==r?r:this.options.exportFilename,l=void 0!==l?l:this.options.exportFileextension,v(this).children(".spinner").length)return!1;var c=this.$chartContainer,e=c.find(".mask");e.length?e.removeClass("hidden"):c.append('
    ');var t=c.addClass("canvasContainer").find('.orgchart:not(".hidden")').get(0),i="l2r"===h.options.direction||"r2l"===h.options.direction;html2canvas(t,{width:i?t.clientHeight:t.clientWidth,height:i?t.clientWidth:t.clientHeight,onclone:function(e){v(e).find(".canvasContainer").css("overflow","visible").find('.orgchart:not(".hidden"):first').css("transform","")},onrendered:function(e){if(c.find(".mask").addClass("hidden"),"pdf"===l.toLowerCase()){var t={},i=Math.floor(.2646*e.width),n=Math.floor(.2646*e.height);(t=n'),c.find(d).attr("href",e.toDataURL())[0].click()}}}}).then(function(){c.removeClass("canvasContainer")},function(){c.removeClass("canvasContainer")})}},v.fn.orgchart=function(e){return new t(this,e).init()}}); +"use strict";!function(e){"object"==typeof module&&"object"==typeof module.exports?e(require("jquery"),window,document):e(jQuery,window,document)}(function(v,p,f,e){var t=function(e,t){this.$chartContainer=v(e),this.opts=t,this.defaultOptions={nodeTitle:"name",nodeId:"id",toggleSiblingsResp:!1,visibleLevel:999,chartClass:"",exportButton:!1,exportFilename:"OrgChart",exportFileextension:"png",parentNodeSymbol:"fa-users",draggable:!1,direction:"t2b",pan:!1,zoom:!1,zoominLimit:7,zoomoutLimit:.5}};t.prototype={init:function(e){var n=this;this.options=v.extend({},this.defaultOptions,this.opts,e);var t=this.$chartContainer;this.$chart&&this.$chart.remove();var i=this.options.data,s=this.$chart=v("
    ",{data:{options:this.options},class:"orgchart"+(""!==this.options.chartClass?" "+this.options.chartClass:"")+("t2b"!==this.options.direction?" "+this.options.direction:""),click:function(e){v(e.target).closest(".node").length||s.find(".node.focused").removeClass("focused")}});return"undefined"!=typeof MutationObserver&&this.triggerInitEvent(),"object"===v.type(i)?i instanceof v?this.buildHierarchy(s,this.buildJsonDS(i.children()),0,this.options):this.buildHierarchy(s,this.options.ajaxURL?i:this.attachRel(i,"00")):(s.append(''),v.ajax({url:i,dataType:"json"}).done(function(e,t,i){n.buildHierarchy(s,n.options.ajaxURL?e:n.attachRel(e,"00"),0,n.options)}).fail(function(e,t,i){console.log(i)}).always(function(){s.children(".spinner").remove()})),t.append(s),this.options.exportButton&&!t.find(".oc-export-btn").length&&this.attachExportButton(),this.options.pan&&this.bindPan(),this.options.zoom&&this.bindZoom(),this},triggerInitEvent:function(){var s=this,a=new MutationObserver(function(e){a.disconnect();e:for(var t=0;t",{class:"oc-export-btn"+(""!==this.options.chartClass?" "+this.options.chartClass:""),text:"Export",click:function(e){e.preventDefault(),t.export()}});this.$chartContainer.append(e)},setOptions:function(e,t){return"string"==typeof e&&("pan"===e&&(t?this.bindPan():this.unbindPan()),"zoom"===e&&(t?this.bindZoom():this.unbindZoom())),"object"==typeof e&&(e.data?this.init(e):(void 0!==e.pan&&(e.pan?this.bindPan():this.unbindPan()),void 0!==e.zoom&&(e.zoom?this.bindZoom():this.unbindZoom()))),this},panStartHandler:function(e){var a=v(e.delegateTarget);if(v(e.target).closest(".node").length||e.touches&&1i.zoomoutLimit&&ai.zoomoutLimit&&a').children().not(".spinner").css("opacity",.2),t.data("inAjax",!0),v(".oc-export-btn"+(""!==this.options.chartClass?"."+this.options.chartClass:"")).prop("disabled",!0),!0)},endLoading:function(e){var t=e.parent();e.removeClass("hidden"),t.find(".spinner").remove(),t.children().removeAttr("style"),this.$chart.data("inAjax",!1),v(".oc-export-btn"+(""!==this.options.chartClass?"."+this.options.chartClass:"")).prop("disabled",!1)},isInAction:function(e){return-1';t.closest("tr").next().addBack().children().attr("colspan",a),i.find(".horizontalEdge").length||i.append(o),t.closest("tr").siblings().eq(1).children(":last").before('
    ').end().next().append(i.closest("table").parent());var d=i.closest("table").parent().siblings().find(".node:first");1===d.length&&d.append(o)}else t.append('').parent().attr("colspan",2).parent().after('').siblings(":last").append(i.find(".horizontalEdge").remove().end().closest("table").parent());var r=parseInt(n.attr("colspan"));if(2").addClass("node "+(i.className||"")+(t>e.visibleLevel?" slide-up":""));e.nodeTemplate?n.append(e.nodeTemplate(i)):n.append('
    '+i[e.nodeTitle]+"
    ").append(void 0!==e.nodeContent?'
    '+(i[e.nodeContent]||"")+"
    ":"");var s=v.extend({},i);delete s.children,n.data("nodeData",s);var a=i.relationship||"";if(e.verticalLevel&&t>=e.verticalLevel){if(t+1>e.verticalLevel&&Number(a.substr(2,1))){var o=t+1>e.visibleLevel?"plus":"minus";n.append('')}}else Number(a.substr(0,1))&&n.append(''),Number(a.substr(1,1))&&n.append(''),Number(a.substr(2,1))&&n.append('').children(".title").prepend('');return n.on("mouseenter mouseleave",this.nodeEnterLeaveHandler.bind(this)),n.on("click",this.nodeClickHandler.bind(this)),n.on("click",".topEdge",this.topEdgeClickHandler.bind(this)),n.on("click",".bottomEdge",this.bottomEdgeClickHandler.bind(this)),n.on("click",".leftEdge, .rightEdge",this.hEdgeClickHandler.bind(this)),n.on("click",".toggleBtn",this.toggleVNodes.bind(this)),e.draggable&&(this.bindDragDrop(n),this.touchHandled=!1,this.touchMoved=!1,this.touchTargetNode=null),e.createNode&&e.createNode(n,i),n},buildHierarchy:function(e,t){var i=this,n=this.options,s=0;s=t.level?t.level:t.level=e.parentsUntil(".orgchart",".nodes").length+1;var a,o=t.children,d=!!o&&o.length;if(2=n.verticalLevel?e.append(r):(a=v("
    ').append(this.createNode(t)))).append('
    "),e.append(a.append(v("").append(v("").append(r)))))}if(d){var l,h=s+1>n.visibleLevel||t.collapsed?" hidden":"",c=!!(n.verticalLevel&&s+1>=n.verticalLevel);if(c)l=v("
      "),h&&s+1>n.verticalLevel&&l.addClass(h),s+1===n.verticalLevel?e.children("table").append('
    ').find(".verticalNodes").children().append(l):e.append(l);else{for(var g=v(''),p='',f=1;f';p+='',l=v(''),2===Object.keys(t).length?e.append(g).append(p).append(l):a.append(g).append(p).append(l)}v.each(o,function(){var e=v(c?"
  • ":'
  • ');l.append(e),this.level=s+1,i.buildHierarchy(e,this)})}},buildChildNode:function(e,t){e.find("td:first").attr("colspan",2*t.length),this.buildHierarchy(e,{children:t})},addChildren:function(e,t){this.buildChildNode(e.closest("table"),t),e.children(".bottomEdge").length||e.append(''),e.find(".symbol").length||e.children(".title").prepend(''),this.isInAction(e)&&this.switchVerticalArrow(e.children(".bottomEdge"))},buildParentNode:function(e,t){t.relationship=t.relationship||"001";var i=v("").append(v("").append(v('').append('');this.$chart.prepend(i).children("table:first").append('').children("tr:last").children().append(this.$chart.children("table").last())},addParent:function(e,t){this.buildParentNode(e,t),e.children(".topEdge").length||e.children(".title").after(''),this.isInAction(e)&&this.switchVerticalArrow(e.children(".topEdge"))},complementLine:function(e,t,i){for(var n="",s=0;s';e.parent().prevAll("tr:gt(0)").children().attr("colspan",2*t).end().next().children(":first").after(n)},buildSiblingNode:function(e,t){var i=v.isArray(t)?t.length:t.children.length,n=e.parent().is("td")?e.closest("tr").children().length:1,s=n+i,a=1').append(e)),s,1)},addSiblings:function(e,t){this.buildSiblingNode(e.closest("table"),t),e.closest(".nodes").data("siblingsLoaded",!0),e.children(".leftEdge").length||e.children(".topEdge").after(''),this.isInAction(e)&&(this.switchHorizontalArrow(e),e.children(".topEdge").removeClass("fa-chevron-up").addClass("fa-chevron-down"))},removeNodes:function(e){var t=e.closest("table").parent(),i=t.parent().siblings();t.is("td")?this.getNodeState(e,"siblings").exist?(i.eq(2).children(".topLine:lt(2)").remove(),i.slice(0,2).children().attr("colspan",i.eq(2).children().length),t.remove()):i.eq(0).children().removeAttr("colspan").find(".bottomEdge").remove().end().end().siblings().remove():t.add(t.siblings()).remove()},export:function(r,l){var h=this;if(r=void 0!==r?r:this.options.exportFilename,l=void 0!==l?l:this.options.exportFileextension,v(this).children(".spinner").length)return!1;var c=this.$chartContainer,e=c.find(".mask");e.length?e.removeClass("hidden"):c.append('
    ');var t=c.addClass("canvasContainer").find('.orgchart:not(".hidden")').get(0),i="l2r"===h.options.direction||"r2l"===h.options.direction;html2canvas(t,{width:i?t.clientHeight:t.clientWidth,height:i?t.clientWidth:t.clientHeight,onclone:function(e){v(e).find(".canvasContainer").css("overflow","visible").find('.orgchart:not(".hidden"):first').css("transform","")},onrendered:function(e){if(c.find(".mask").addClass("hidden"),"pdf"===l.toLowerCase()){var t={},i=Math.floor(.2646*e.width),n=Math.floor(.2646*e.height);(t=n'),c.find(d).attr("href",e.toDataURL())[0].click()}}}}).then(function(){c.removeClass("canvasContainer")},function(){c.removeClass("canvasContainer")})}},v.fn.orgchart=function(e){return new t(this,e).init()}}); //# sourceMappingURL=jquery.orgchart.min.js.map diff --git a/dist/js/jquery.orgchart.min.js.map b/dist/js/jquery.orgchart.min.js.map index c43a8a88..e020ae06 100644 --- a/dist/js/jquery.orgchart.min.js.map +++ b/dist/js/jquery.orgchart.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["jquery.orgchart.js"],"names":["factory","module","exports","require","window","document","jQuery","$","undefined","OrgChart","elem","opts","this","$chartContainer","defaultOptions","nodeTitle","nodeId","toggleSiblingsResp","visibleLevel","chartClass","exportButton","exportFilename","exportFileextension","parentNodeSymbol","draggable","direction","pan","zoom","zoominLimit","zoomoutLimit","prototype","init","that","options","extend","$chart","remove","data","class","click","event","target","closest","length","find","removeClass","MutationObserver","triggerInitEvent","type","buildHierarchy","buildJsonDS","children","ajaxURL","attachRel","append","ajax","url","dataType","done","textStatus","jqXHR","fail","errorThrown","console","log","always","attachExportButton","bindPan","bindZoom","mo","mutations","disconnect","initTime","i","j","addedNodes","classList","contains","initCompleted","initEvent","Event","trigger","observe","childList","$exportBtn","text","e","preventDefault","export","setOptions","val","unbindPan","unbindZoom","panStartHandler","delegateTarget","touches","css","lastX","lastY","lastTf","temp","split","indexOf","parseInt","startX","startY","targetTouches","pageX","pageY","on","newX","newY","matrix","join","panEndHandler","chart","off","zoomWheelHandler","oc","newScale","originalEvent","deltaY","setChartScale","zoomStartHandler","dist","getPinchDist","zoomingHandler","zoomEndHandler","diff","Math","sqrt","clientX","clientY","targetScale","abs","parseFloat","$li","subObj","name","contents","eq","trim","relationship","parent","is","siblings","each","key","value","push","flags","forEach","item","loopChart","$tr","id","getHierarchy","valid","getNodeState","$node","relation","$target","exist","visible","getRelatedNodes","hideParentEnd","upperLevel","addClass","slice","removeAttr","hideParent","$upperLevel","hideSiblings","$parent","one","showParentEnd","node","isInAction","switchVerticalArrow","showParent","repaint","bind","stopAjax","$nodeLevel","isVisibleNode","index","hideChildrenEnd","animatedNodes","isVerticalDesc","lowerLevel","prevAll","addBack","last","hideChildren","$lowerLevel","$animatedNodes","filter","get","showChildrenEnd","showChildren","$levels","hideSiblingsEnd","$nodeContainer","nodeContainer","lines","$siblings","nextAll","prev","end","switchHorizontalArrow","$lines","showSiblingsEnd","visibleNodes","showRelatedParentEnd","showSiblings","$visibleNodes","startLoading","$edge","not","prop","endLoading","attr","$arrow","toggleClass","$prevSib","$nextSib","next","$sibs","sibsVisible","style","offsetWidth","nodeEnterLeaveHandler","flag","$topEdge","$bottomEdge","$leftEdge","nodeClickHandler","loadNodes","rel","isEmptyObject","addParent","addChildren","addSiblings","HideFirstParentEnd","topEdge","topEdgeClickHandler","stopPropagation","parentState","isFunction","bottomEdgeClickHandler","childrenState","hEdgeClickHandler","$hEdge","siblingsState","families","expandVNodesEnd","vNodes","collapseVNodesEnd","toggleVNodes","$toggleBtn","$descWrapper","$descendants","$children","createGhostNode","ghostNode","nodeCover","$nodeDiv","origEvent","isFirefox","test","navigator","userAgent","toLowerCase","dataTransfer","setData","querySelector","createElementNS","add","appendChild","transValues","scale","setAttribute","outerWidth","outerHeight","xOffset","offsetX","yOffset","offsetY","ghostNodeWrapper","createElement","src","XMLSerializer","serializeToString","setDragImage","filterAllowedDropNodes","$dragged","$dragZone","$dragHier","dropCriteria","dragstartHandler","dragoverHandler","dropEffect","dragendHandler","dropHandler","$dropZone","dropEvent","draggedNode","dragZone","dropZone","isDefaultPrevented","dropColspan","horizontalEdges","before","$dropSibs","after","dragColspan","$dragSibs","touchstartHandler","touchHandled","touchMoved","innerText","touchmoveHandler","hasClass","simulateMouseEvent","$touchingNode","elementFromPoint","touchingNodeElement","touchTargetNode","touchendHandler","fakeEventForDropHandler","simulatedType","touch","changedTouches","simulatedEvent","createEvent","initMouseEvent","screenX","screenY","dispatchEvent","bindDragDrop","createNode","level","child","parentId","className","nodeTemplate","nodeContent","nodeData","verticalLevel","Number","substr","icon","prepend","$appendTo","parentsUntil","$nodeWrapper","childrenData","hasChildren","Object","keys","$nodesLayer","isHidden","collapsed","isVerticalLayer","$upperLines","lowerLines","$nodeCell","buildChildNode","buildParentNode","$currentRoot","$table","complementLine","$oneSibling","siblingCount","existingSibligCount","buildSiblingNode","$nodeChart","newSiblingCount","isArray","insertPostion","floor","$siblingTds","unwrap","removeNodes","$mask","sourceChart","html2canvas","width","clientHeight","clientWidth","height","onclone","cloneDoc","onrendered","canvas","doc","docWidth","docHeight","jsPDF","addImage","toDataURL","save","isWebkit","documentElement","isFf","sideb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3B,WACDhC,EAAgBgC,YAAY,uBAKlCtC,EAAEsZ,GAAGC,SAAW,SAAUnZ,GACxB,OAAO,IAAIF,EAASG,KAAMD,GAAMoB","file":"jquery.orgchart.min.js","sourcesContent":["/*\n * jQuery OrgChart Plugin\n * https://github.com/dabeng/OrgChart\n *\n * Copyright 2016, dabeng\n * https://github.com/dabeng\n *\n * Licensed under the MIT license:\n * http://www.opensource.org/licenses/MIT\n */\n'use strict';\n\n(function (factory) {\n if (typeof module === 'object' && typeof module.exports === 'object') {\n factory(require('jquery'), window, document);\n } else {\n factory(jQuery, window, document);\n }\n}(function ($, window, document, undefined) {\n var OrgChart = function (elem, opts) {\n this.$chartContainer = $(elem);\n this.opts = opts;\n this.defaultOptions = {\n 'nodeTitle': 'name',\n 'nodeId': 'id',\n 'toggleSiblingsResp': false,\n 'visibleLevel': 999,\n 'chartClass': '',\n 'exportButton': false,\n 'exportFilename': 'OrgChart',\n 'exportFileextension': 'png',\n 'parentNodeSymbol': 'fa-users',\n 'draggable': false,\n 'direction': 't2b',\n 'pan': false,\n 'zoom': false,\n 'zoominLimit': 7,\n 'zoomoutLimit': 0.5\n };\n };\n //\n OrgChart.prototype = {\n //\n init: function (opts) {\n var that = this;\n this.options = $.extend({}, this.defaultOptions, this.opts, opts);\n // build the org-chart\n var $chartContainer = this.$chartContainer;\n if (this.$chart) {\n this.$chart.remove();\n }\n var data = this.options.data;\n var $chart = this.$chart = $('
    ', {\n 'data': { 'options': this.options },\n 'class': 'orgchart' + (this.options.chartClass !== '' ? ' ' + this.options.chartClass : '') + (this.options.direction !== 't2b' ? ' ' + this.options.direction : ''),\n 'click': function(event) {\n if (!$(event.target).closest('.node').length) {\n $chart.find('.node.focused').removeClass('focused');\n }\n }\n });\n if (typeof MutationObserver !== 'undefined') {\n this.triggerInitEvent();\n }\n if ($.type(data) === 'object') {\n if (data instanceof $) { // ul datasource\n this.buildHierarchy($chart, this.buildJsonDS(data.children()), 0, this.options);\n } else { // local json datasource\n this.buildHierarchy($chart, this.options.ajaxURL ? data : this.attachRel(data, '00'));\n }\n } else {\n $chart.append('');\n $.ajax({\n 'url': data,\n 'dataType': 'json'\n })\n .done(function(data, textStatus, jqXHR) {\n that.buildHierarchy($chart, that.options.ajaxURL ? data : that.attachRel(data, '00'), 0, that.options);\n })\n .fail(function(jqXHR, textStatus, errorThrown) {\n console.log(errorThrown);\n })\n .always(function() {\n $chart.children('.spinner').remove();\n });\n }\n $chartContainer.append($chart);\n\n // append the export button\n if (this.options.exportButton && !$chartContainer.find('.oc-export-btn').length) {\n this.attachExportButton();\n }\n\n if (this.options.pan) {\n this.bindPan();\n }\n\n if (this.options.zoom) {\n this.bindZoom();\n }\n\n return this;\n },\n //\n triggerInitEvent: function () {\n var that = this;\n var mo = new MutationObserver(function (mutations) {\n mo.disconnect();\n initTime:\n for (var i = 0; i < mutations.length; i++) {\n for (var j = 0; j < mutations[i].addedNodes.length; j++) {\n if (mutations[i].addedNodes[j].classList.contains('orgchart')) {\n if (that.options.initCompleted && typeof that.options.initCompleted === 'function') {\n that.options.initCompleted(that.$chart);\n var initEvent = $.Event('init.orgchart');\n that.$chart.trigger(initEvent);\n break initTime;\n }\n }\n }\n }\n });\n mo.observe(this.$chartContainer[0], { childList: true });\n },\n //\n attachExportButton: function () {\n var that = this;\n var $exportBtn = $('
    '\n + ''\n + '')\n .siblings(':last').append($dragged.find('.horizontalEdge').remove().end().closest('table').parent());\n } else {\n var dropColspan = parseInt($dropZone.parent().attr('colspan')) + 2;\n var horizontalEdges = '';\n $dropZone.closest('tr').next().addBack().children().attr('colspan', dropColspan);\n if (!$dragged.find('.horizontalEdge').length) {\n $dragged.append(horizontalEdges);\n }\n $dropZone.closest('tr').siblings().eq(1).children(':last').before('')\n .end().next().append($dragged.closest('table').parent());\n var $dropSibs = $dragged.closest('table').parent().siblings().find('.node:first');\n if ($dropSibs.length === 1) {\n $dropSibs.append(horizontalEdges);\n }\n }\n // secondly, deal with the hierarchy of dragged node\n var dragColspan = parseInt($dragZone.attr('colspan'));\n if (dragColspan > 2) {\n $dragZone.attr('colspan', dragColspan - 2)\n .parent().next().children().attr('colspan', dragColspan - 2)\n .end().next().children().slice(1, 3).remove();\n var $dragSibs = $dragZone.parent().siblings('.nodes').children().find('.node:first');\n if ($dragSibs.length ===1) {\n $dragSibs.find('.horizontalEdge').remove();\n }\n } else {\n $dragZone.removeAttr('colspan')\n .find('.bottomEdge').remove()\n .end().end().siblings().remove();\n }\n },\n //\n touchstartHandler: function (event) {\n console.log(\"orgChart: touchstart 1: touchHandled=\" + this.touchHandled + \", touchMoved=\" + this.touchMoved + \", target=\" + event.target.innerText);\n if (this.touchHandled)\n return;\n this.touchHandled = true;\n this.touchMoved = false; // this is so we can work out later if this was a 'press' or a 'drag' touch\n event.preventDefault();\n },\n //\n touchmoveHandler: function (event) {\n if (!this.touchHandled)\n return;\n event.preventDefault();\n if (!this.touchMoved) {\n var nodeIsSelected = $(this).hasClass('focused');\n console.log(\"orgChart: touchmove 1: \" + event.touches.length + \" touches, we have not moved, so simulate a drag start\", event.touches);\n // TODO: visualise the start of the drag (as would happen on desktop)\n this.simulateMouseEvent(event, 'dragstart');\n }\n this.touchMoved = true;\n var $touching = $(document.elementFromPoint(event.touches[0].clientX, event.touches[0].clientY));\n var $touchingNode = $touching.closest('div.node');\n \n if ($touchingNode.length > 0) {\n var touchingNodeElement = $touchingNode[0];\n // TODO: simulate the dragover visualisation\n if ($touchingNode.is('.allowedDrop')) {\n console.log(\"orgChart: touchmove 2: this node (\" + touchingNodeElement.id + \") is allowed to be a drop target\");\n this.touchTargetNode = touchingNodeElement;\n } else {\n console.log(\"orgChart: touchmove 3: this node (\" + touchingNodeElement.id + \") is NOT allowed to be a drop target\");\n this.touchTargetNode = null;\n }\n } else {\n console.log(\"orgchart: touchmove 4: not touching a node\");\n this.touchTargetNode = null;\n }\n },\n //\n touchendHandler: function (event) {\n console.log(\"orgChart: touchend 1: touchHandled=\" + this.touchHandled + \", touchMoved=\" + this.touchMoved + \", \" + event.target.innerText + \" \");\n if (!this.touchHandled) {\n console.log(\"orgChart: touchend 2: not handled by us, so aborting\");\n return;\n }\n if (this.touchMoved) {\n // we've had movement, so this was a 'drag' touch\n if (this.touchTargetNode) {\n console.log(\"orgChart: touchend 3: moved to a node, so simulating drop\");\n var fakeEventForDropHandler = { delegateTarget: this.touchTargetNode };\n this.dropHandler(fakeEventForDropHandler);\n this.touchTargetNode = null;\n }\n console.log(\"orgChart: touchend 4: simulating dragend\");\n this.simulateMouseEvent(event, 'dragend');\n }\n else {\n // we did not move, so assume this was a 'press' touch\n console.log(\"orgChart: touchend 5: moved, so simulating click\");\n this.simulateMouseEvent(event, 'click');\n }\n this.touchHandled = false;\n },\n // simulate a mouse event (so we can fake them on a touch device)\n simulateMouseEvent: function (event, simulatedType) {\n // Ignore multi-touch events\n if (event.originalEvent.touches.length > 1) {\n return;\n }\n var touch = event.originalEvent.changedTouches[0];\n var simulatedEvent = document.createEvent('MouseEvents');\n simulatedEvent.initMouseEvent(\n simulatedType, // type\n true, // bubbles \n true, // cancelable \n window, // view \n 1, // detail \n touch.screenX, // screenX \n touch.screenY, // screenY \n touch.clientX, // clientX \n touch.clientY, // clientY \n false, // ctrlKey \n false, // altKey \n false, // shiftKey \n false, // metaKey \n 0, // button \n null // relatedTarget \n );\n // Dispatch the simulated event to the target element\n event.target.dispatchEvent(simulatedEvent);\n },\n //\n bindDragDrop: function ($node) {\n $node.on('dragstart', this.dragstartHandler.bind(this))\n .on('dragover', this.dragoverHandler.bind(this))\n .on('dragend', this.dragendHandler.bind(this))\n .on('drop', this.dropHandler.bind(this))\n .on('touchstart', this.touchstartHandler.bind(this))\n .on('touchmove', this.touchmoveHandler.bind(this))\n .on('touchend', this.touchendHandler.bind(this));\n },\n // create node\n createNode: function (data) {\n var that = this;\n var opts = this.options;\n var level = data.level;\n if (data.children) {\n $.each(data.children, function (index, child) {\n child.parentId = data.id;\n });\n }\n // construct the content of node\n var $nodeDiv = $('')\n .addClass('node ' + (data.className || '') + (level > opts.visibleLevel ? ' slide-up' : ''));\n if (opts.nodeTemplate) {\n $nodeDiv.append(opts.nodeTemplate(data));\n } else {\n $nodeDiv.append('
    ' + data[opts.nodeTitle] + '
    ')\n .append(typeof opts.nodeContent !== 'undefined' ? '
    ' + (data[opts.nodeContent] || '') + '
    ' : '');\n }\n //\n var nodeData = $.extend({}, data);\n delete nodeData.children;\n $nodeDiv.data('nodeData', nodeData);\n // append 4 direction arrows or expand/collapse buttons\n var flags = data.relationship || '';\n if (opts.verticalLevel && level >= opts.verticalLevel) {\n if ((level + 1) > opts.verticalLevel && Number(flags.substr(2,1))) {\n var icon = level + 1 > opts.visibleLevel ? 'plus' : 'minus';\n $nodeDiv.append('');\n }\n } else {\n if (Number(flags.substr(0,1))) {\n $nodeDiv.append('');\n }\n if(Number(flags.substr(1,1))) {\n $nodeDiv.append('' +\n '');\n }\n if(Number(flags.substr(2,1))) {\n $nodeDiv.append('')\n .children('.title').prepend('');\n }\n }\n\n $nodeDiv.on('mouseenter mouseleave', this.nodeEnterLeaveHandler.bind(this));\n $nodeDiv.on('click', this.nodeClickHandler.bind(this));\n $nodeDiv.on('click', '.topEdge', this.topEdgeClickHandler.bind(this));\n $nodeDiv.on('click', '.bottomEdge', this.bottomEdgeClickHandler.bind(this));\n $nodeDiv.on('click', '.leftEdge, .rightEdge', this.hEdgeClickHandler.bind(this));\n $nodeDiv.on('click', '.toggleBtn', this.toggleVNodes.bind(this));\n\n if (opts.draggable) {\n this.bindDragDrop($nodeDiv);\n this.touchHandled = false;\n this.touchMoved = false;\n this.touchTargetNode = null;\n }\n // allow user to append dom modification after finishing node create of orgchart\n if (opts.createNode) {\n opts.createNode($nodeDiv, data);\n }\n\n return $nodeDiv;\n },\n // recursively build the tree\n buildHierarchy: function ($appendTo, data) {\n var that = this;\n var opts = this.options;\n var level = 0;\n if (data.level) {\n level = data.level;\n } else {\n level = data.level = $appendTo.parentsUntil('.orgchart', '.nodes').length + 1;\n }\n // Construct the node\n var childrenData = data.children;\n var hasChildren = childrenData ? childrenData.length : false;\n var $nodeWrapper;\n if (Object.keys(data).length > 2) {\n var $nodeDiv = this.createNode(data);\n if (opts.verticalLevel && level >= opts.verticalLevel) {\n $appendTo.append($nodeDiv);\n }else {\n $nodeWrapper = $('
    ').append(this.createNode(t)))).append('
    ');\n $appendTo.append($nodeWrapper.append($('').append($('').append($nodeDiv))));\n }\n }\n // Construct the lower level(two \"connectiong lines\" rows and \"inferior nodes\" row)\n if (hasChildren) {\n var isHidden = (level + 1 > opts.visibleLevel || data.collapsed) ? ' hidden' : '';\n var isVerticalLayer = (opts.verticalLevel && (level + 1) >= opts.verticalLevel) ? true : false;\n var $nodesLayer;\n if (isVerticalLayer) {\n $nodesLayer = $('
      ');\n if (isHidden && level + 1 > opts.verticalLevel) {\n $nodesLayer.addClass(isHidden);\n }\n if (level + 1 === opts.verticalLevel) {\n $appendTo.children('table').append('
    ')\n .find('.verticalNodes').children().append($nodesLayer);\n } else {\n $appendTo.append($nodesLayer);\n }\n } else {\n var $upperLines = $('');\n var lowerLines = '';\n for (var i=1; i');\n if (Object.keys(data).length === 2) {\n $appendTo.append($upperLines).append(lowerLines).append($nodesLayer);\n } else {\n $nodeWrapper.append($upperLines).append(lowerLines).append($nodesLayer);\n }\n }\n // recurse through children nodes\n $.each(childrenData, function () {\n var $nodeCell = isVerticalLayer ? $('
  • ') : $('
  • ');\n $nodesLayer.append($nodeCell);\n this.level = level + 1;\n that.buildHierarchy($nodeCell, this);\n });\n }\n },\n // build the child nodes of specific node\n buildChildNode: function ($appendTo, data) {\n $appendTo.find('td:first').attr('colspan', data.length * 2);\n this.buildHierarchy($appendTo, { 'children': data });\n },\n // exposed method\n addChildren: function ($node, data) {\n this.buildChildNode($node.closest('table'), data);\n if (!$node.children('.bottomEdge').length) {\n $node.append('');\n }\n if (!$node.find('.symbol').length) {\n $node.children('.title').prepend('');\n }\n if (this.isInAction($node)) {\n this.switchVerticalArrow($node.children('.bottomEdge'));\n }\n },\n // build the parent node of specific node\n buildParentNode: function ($currentRoot, data) {\n data.relationship = data.relationship || '001';\n var $table = $('')\n .append($('').append($('')\n .append('');\n this.$chart.prepend($table)\n .children('table:first').append('')\n .children('tr:last').children().append(this.$chart.children('table').last());\n },\n // exposed method\n addParent: function ($currentRoot, data) {\n this.buildParentNode($currentRoot, data);\n if (!$currentRoot.children('.topEdge').length) {\n $currentRoot.children('.title').after('');\n }\n if (this.isInAction($currentRoot)) {\n this.switchVerticalArrow($currentRoot.children('.topEdge'));\n }\n },\n // subsequent processing of build sibling nodes\n complementLine: function ($oneSibling, siblingCount, existingSibligCount) {\n var lines = '';\n for (var i = 0; i < existingSibligCount; i++) {\n lines += '';\n }\n $oneSibling.parent().prevAll('tr:gt(0)').children().attr('colspan', siblingCount * 2)\n .end().next().children(':first').after(lines);\n },\n // build the sibling nodes of specific node\n buildSiblingNode: function ($nodeChart, data) {\n var newSiblingCount = $.isArray(data) ? data.length : data.children.length;\n var existingSibligCount = $nodeChart.parent().is('td') ? $nodeChart.closest('tr').children().length : 1;\n var siblingCount = existingSibligCount + newSiblingCount;\n var insertPostion = (siblingCount > 1) ? Math.floor(siblingCount/2 - 1) : 0;\n // just build the sibling nodes for the specific node\n if ($nodeChart.parent().is('td')) {\n var $parent = $nodeChart.closest('tr').prevAll('tr:last');\n $nodeChart.closest('tr').prevAll('tr:lt(2)').remove();\n this.buildChildNode($nodeChart.parent().closest('table'), data);\n var $siblingTds = $nodeChart.parent().closest('table').children('tr:last').children('td');\n if (existingSibligCount > 1) {\n this.complementLine($siblingTds.eq(0).before($nodeChart.closest('td').siblings().addBack().unwrap()), siblingCount, existingSibligCount);\n } else {\n this.complementLine($siblingTds.eq(insertPostion).after($nodeChart.closest('td').unwrap()), siblingCount, 1);\n }\n } else { // build the sibling nodes and parent node for the specific ndoe\n this.buildHierarchy($nodeChart.closest('.orgchart'), data);\n this.complementLine($nodeChart.next().children('tr:last').children().eq(insertPostion).after($(''\n + ''\n + '')\n .siblings(':last').append($dragged.find('.horizontalEdge').remove().end().closest('table').parent());\n } else {\n var dropColspan = parseInt($dropZone.parent().attr('colspan')) + 2;\n var horizontalEdges = '';\n $dropZone.closest('tr').next().addBack().children().attr('colspan', dropColspan);\n if (!$dragged.find('.horizontalEdge').length) {\n $dragged.append(horizontalEdges);\n }\n $dropZone.closest('tr').siblings().eq(1).children(':last').before('')\n .end().next().append($dragged.closest('table').parent());\n var $dropSibs = $dragged.closest('table').parent().siblings().find('.node:first');\n if ($dropSibs.length === 1) {\n $dropSibs.append(horizontalEdges);\n }\n }\n // secondly, deal with the hierarchy of dragged node\n var dragColspan = parseInt($dragZone.attr('colspan'));\n if (dragColspan > 2) {\n $dragZone.attr('colspan', dragColspan - 2)\n .parent().next().children().attr('colspan', dragColspan - 2)\n .end().next().children().slice(1, 3).remove();\n var $dragSibs = $dragZone.parent().siblings('.nodes').children().find('.node:first');\n if ($dragSibs.length ===1) {\n $dragSibs.find('.horizontalEdge').remove();\n }\n } else {\n $dragZone.removeAttr('colspan')\n .find('.bottomEdge').remove()\n .end().end().siblings().remove();\n }\n },\n //\n touchstartHandler: function (event) {\n console.log(\"orgChart: touchstart 1: touchHandled=\" + this.touchHandled + \", touchMoved=\" + this.touchMoved + \", target=\" + event.target.innerText);\n if (this.touchHandled)\n return;\n this.touchHandled = true;\n this.touchMoved = false; // this is so we can work out later if this was a 'press' or a 'drag' touch\n event.preventDefault();\n },\n //\n touchmoveHandler: function (event) {\n if (!this.touchHandled)\n return;\n event.preventDefault();\n if (!this.touchMoved) {\n var nodeIsSelected = $(this).hasClass('focused');\n console.log(\"orgChart: touchmove 1: \" + event.touches.length + \" touches, we have not moved, so simulate a drag start\", event.touches);\n // TODO: visualise the start of the drag (as would happen on desktop)\n this.simulateMouseEvent(event, 'dragstart');\n }\n this.touchMoved = true;\n var $touching = $(document.elementFromPoint(event.touches[0].clientX, event.touches[0].clientY));\n var $touchingNode = $touching.closest('div.node');\n \n if ($touchingNode.length > 0) {\n var touchingNodeElement = $touchingNode[0];\n // TODO: simulate the dragover visualisation\n if ($touchingNode.is('.allowedDrop')) {\n console.log(\"orgChart: touchmove 2: this node (\" + touchingNodeElement.id + \") is allowed to be a drop target\");\n this.touchTargetNode = touchingNodeElement;\n } else {\n console.log(\"orgChart: touchmove 3: this node (\" + touchingNodeElement.id + \") is NOT allowed to be a drop target\");\n this.touchTargetNode = null;\n }\n } else {\n console.log(\"orgchart: touchmove 4: not touching a node\");\n this.touchTargetNode = null;\n }\n },\n //\n touchendHandler: function (event) {\n console.log(\"orgChart: touchend 1: touchHandled=\" + this.touchHandled + \", touchMoved=\" + this.touchMoved + \", \" + event.target.innerText + \" \");\n if (!this.touchHandled) {\n console.log(\"orgChart: touchend 2: not handled by us, so aborting\");\n return;\n }\n if (this.touchMoved) {\n // we've had movement, so this was a 'drag' touch\n if (this.touchTargetNode) {\n console.log(\"orgChart: touchend 3: moved to a node, so simulating drop\");\n var fakeEventForDropHandler = { delegateTarget: this.touchTargetNode };\n this.dropHandler(fakeEventForDropHandler);\n this.touchTargetNode = null;\n }\n console.log(\"orgChart: touchend 4: simulating dragend\");\n this.simulateMouseEvent(event, 'dragend');\n }\n else {\n // we did not move, so assume this was a 'press' touch\n console.log(\"orgChart: touchend 5: moved, so simulating click\");\n this.simulateMouseEvent(event, 'click');\n }\n this.touchHandled = false;\n },\n // simulate a mouse event (so we can fake them on a touch device)\n simulateMouseEvent: function (event, simulatedType) {\n // Ignore multi-touch events\n if (event.originalEvent.touches.length > 1) {\n return;\n }\n var touch = event.originalEvent.changedTouches[0];\n var simulatedEvent = document.createEvent('MouseEvents');\n simulatedEvent.initMouseEvent(\n simulatedType, // type\n true, // bubbles \n true, // cancelable \n window, // view \n 1, // detail \n touch.screenX, // screenX \n touch.screenY, // screenY \n touch.clientX, // clientX \n touch.clientY, // clientY \n false, // ctrlKey \n false, // altKey \n false, // shiftKey \n false, // metaKey \n 0, // button \n null // relatedTarget \n );\n // Dispatch the simulated event to the target element\n event.target.dispatchEvent(simulatedEvent);\n },\n //\n bindDragDrop: function ($node) {\n $node.on('dragstart', this.dragstartHandler.bind(this))\n .on('dragover', this.dragoverHandler.bind(this))\n .on('dragend', this.dragendHandler.bind(this))\n .on('drop', this.dropHandler.bind(this))\n .on('touchstart', this.touchstartHandler.bind(this))\n .on('touchmove', this.touchmoveHandler.bind(this))\n .on('touchend', this.touchendHandler.bind(this));\n },\n // create node\n createNode: function (data) {\n var that = this;\n var opts = this.options;\n var level = data.level;\n if (data.children) {\n $.each(data.children, function (index, child) {\n child.parentId = data.id;\n });\n }\n // construct the content of node\n var $nodeDiv = $('')\n .addClass('node ' + (data.className || '') + (level > opts.visibleLevel ? ' slide-up' : ''));\n if (opts.nodeTemplate) {\n $nodeDiv.append(opts.nodeTemplate(data));\n } else {\n $nodeDiv.append('
    ' + data[opts.nodeTitle] + '
    ')\n .append(typeof opts.nodeContent !== 'undefined' ? '
    ' + (data[opts.nodeContent] || '') + '
    ' : '');\n }\n //\n var nodeData = $.extend({}, data);\n delete nodeData.children;\n $nodeDiv.data('nodeData', nodeData);\n // append 4 direction arrows or expand/collapse buttons\n var flags = data.relationship || '';\n if (opts.verticalLevel && level >= opts.verticalLevel) {\n if ((level + 1) > opts.verticalLevel && Number(flags.substr(2,1))) {\n var icon = level + 1 > opts.visibleLevel ? 'plus' : 'minus';\n $nodeDiv.append('');\n }\n } else {\n if (Number(flags.substr(0,1))) {\n $nodeDiv.append('');\n }\n if(Number(flags.substr(1,1))) {\n $nodeDiv.append('' +\n '');\n }\n if(Number(flags.substr(2,1))) {\n $nodeDiv.append('')\n .children('.title').prepend('');\n }\n }\n\n $nodeDiv.on('mouseenter mouseleave', this.nodeEnterLeaveHandler.bind(this));\n $nodeDiv.on('click', this.nodeClickHandler.bind(this));\n $nodeDiv.on('click', '.topEdge', this.topEdgeClickHandler.bind(this));\n $nodeDiv.on('click', '.bottomEdge', this.bottomEdgeClickHandler.bind(this));\n $nodeDiv.on('click', '.leftEdge, .rightEdge', this.hEdgeClickHandler.bind(this));\n $nodeDiv.on('click', '.toggleBtn', this.toggleVNodes.bind(this));\n\n if (opts.draggable) {\n this.bindDragDrop($nodeDiv);\n this.touchHandled = false;\n this.touchMoved = false;\n this.touchTargetNode = null;\n }\n // allow user to append dom modification after finishing node create of orgchart\n if (opts.createNode) {\n opts.createNode($nodeDiv, data);\n }\n\n return $nodeDiv;\n },\n // recursively build the tree\n buildHierarchy: function ($appendTo, data) {\n var that = this;\n var opts = this.options;\n var level = 0;\n if (data.level) {\n level = data.level;\n } else {\n level = data.level = $appendTo.parentsUntil('.orgchart', '.nodes').length + 1;\n }\n // Construct the node\n var childrenData = data.children;\n var hasChildren = childrenData ? childrenData.length : false;\n var $nodeWrapper;\n if (Object.keys(data).length > 2) {\n var $nodeDiv = this.createNode(data);\n if (opts.verticalLevel && level >= opts.verticalLevel) {\n $appendTo.append($nodeDiv);\n }else {\n $nodeWrapper = $('
    ').append(this.createNode(data))))\n .append('
    ').append($nodeChart)),\n siblingCount, 1);\n }\n },\n //\n addSiblings: function ($node, data) {\n this.buildSiblingNode($node.closest('table'), data);\n $node.closest('.nodes').data('siblingsLoaded', true);\n if (!$node.children('.leftEdge').length) {\n $node.children('.topEdge').after('');\n }\n if (this.isInAction($node)) {\n this.switchHorizontalArrow($node);\n $node.children('.topEdge').removeClass('fa-chevron-up').addClass('fa-chevron-down');\n }\n },\n //\n removeNodes: function ($node) {\n var $parent = $node.closest('table').parent();\n var $sibs = $parent.parent().siblings();\n if ($parent.is('td')) {\n if (this.getNodeState($node, 'siblings').exist) {\n $sibs.eq(2).children('.topLine:lt(2)').remove();\n $sibs.slice(0, 2).children().attr('colspan', $sibs.eq(2).children().length);\n $parent.remove();\n } else {\n $sibs.eq(0).children().removeAttr('colspan')\n .find('.bottomEdge').remove()\n .end().end().siblings().remove();\n }\n } else {\n $parent.add($parent.siblings()).remove();\n }\n },\n //\n export: function (exportFilename, exportFileextension) {\n var that = this;\n exportFilename = (typeof exportFilename !== 'undefined') ? exportFilename : this.options.exportFilename;\n exportFileextension = (typeof exportFileextension !== 'undefined') ? exportFileextension : this.options.exportFileextension;\n if ($(this).children('.spinner').length) {\n return false;\n }\n var $chartContainer = this.$chartContainer;\n var $mask = $chartContainer.find('.mask');\n if (!$mask.length) {\n $chartContainer.append('
    ');\n } else {\n $mask.removeClass('hidden');\n }\n var sourceChart = $chartContainer.addClass('canvasContainer').find('.orgchart:not(\".hidden\")').get(0);\n var flag = that.options.direction === 'l2r' || that.options.direction === 'r2l';\n html2canvas(sourceChart, {\n 'width': flag ? sourceChart.clientHeight : sourceChart.clientWidth,\n 'height': flag ? sourceChart.clientWidth : sourceChart.clientHeight,\n 'onclone': function (cloneDoc) {\n $(cloneDoc).find('.canvasContainer').css('overflow', 'visible')\n .find('.orgchart:not(\".hidden\"):first').css('transform', '');\n },\n 'onrendered': function (canvas) {\n $chartContainer.find('.mask').addClass('hidden');\n if (exportFileextension.toLowerCase() === 'pdf') {\n var doc = {};\n var docWidth = Math.floor(canvas.width * 0.2646);\n var docHeight = Math.floor(canvas.height * 0.2646);\n if (docWidth > docHeight) {\n doc = new jsPDF('l', 'mm', [docWidth, docHeight]);\n } else {\n doc = new jsPDF('p', 'mm', [docHeight, docWidth]);\n }\n doc.addImage(canvas.toDataURL(), 'png', 0, 0);\n doc.save(exportFilename + '.pdf');\n } else {\n var isWebkit = 'WebkitAppearance' in document.documentElement.style;\n var isFf = !!window.sidebar;\n var isEdge = navigator.appName === 'Microsoft Internet Explorer' || (navigator.appName === \"Netscape\" && navigator.appVersion.indexOf('Edge') > -1);\n\n if ((!isWebkit && !isFf) || isEdge) {\n window.navigator.msSaveBlob(canvas.msToBlob(), exportFilename + '.png');\n } else {\n var selector = '.oc-download-btn' + (that.options.chartClass !== '' ? '.' + that.options.chartClass : '');\n if (!$chartContainer.find(selector).length) {\n $chartContainer.append('');\n }\n $chartContainer.find(selector).attr('href', canvas.toDataURL())[0].click();\n }\n }\n }\n })\n .then(function () {\n $chartContainer.removeClass('canvasContainer');\n }, function () {\n $chartContainer.removeClass('canvasContainer');\n });\n }\n };\n\n $.fn.orgchart = function (opts) {\n return new OrgChart(this, opts).init();\n };\n\n}));\n"]} \ No newline at end of file +{"version":3,"sources":["jquery.orgchart.js"],"names":["factory","module","exports","require","window","document","jQuery","$","undefined","OrgChart","elem","opts","this","$chartContainer","defaultOptions","nodeTitle","nodeId","toggleSiblingsResp","visibleLevel","chartClass","exportButton","exportFilename","exportFileextension","parentNodeSymbol","draggable","direction","pan","zoom","zoominLimit","zoomoutLimit","prototype","init","that","options","extend","$chart","remove","data","class","click","event","target","closest","length","find","removeClass","MutationObserver","triggerInitEvent","type","buildHierarchy","buildJsonDS","children","ajaxURL","attachRel","append","ajax","url","dataType","done","textStatus","jqXHR","fail","errorThrown","console","log","always","attachExportButton","bindPan","bindZoom","mo","mutations","disconnect","initTime","i","j","addedNodes","classList","contains","initCompleted","initEvent","Event","trigger","observe","childList","$exportBtn","text","e","preventDefault","export","setOptions","val","unbindPan","unbindZoom","panStartHandler","delegateTarget","touches","css","lastX","lastY","lastTf","temp","split","indexOf","parseInt","startX","startY","targetTouches","pageX","pageY","on","newX","newY","matrix","join","panEndHandler","chart","off","zoomWheelHandler","oc","newScale","originalEvent","deltaY","setChartScale","zoomStartHandler","dist","getPinchDist","zoomingHandler","zoomEndHandler","diff","Math","sqrt","clientX","clientY","targetScale","abs","parseFloat","$li","subObj","name","contents","eq","trim","relationship","parent","is","siblings","each","key","value","push","flags","forEach","item","loopChart","$tr","id","getHierarchy","valid","getNodeState","$node","relation","$target","exist","visible","getRelatedNodes","hideParentEnd","upperLevel","addClass","slice","removeAttr","hideParent","$upperLevel","hideSiblings","$parent","one","showParentEnd","node","isInAction","switchVerticalArrow","showParent","repaint","bind","stopAjax","$nodeLevel","isVisibleNode","index","hideChildrenEnd","animatedNodes","isVerticalDesc","lowerLevel","prevAll","addBack","last","hideChildren","$lowerLevel","$animatedNodes","filter","get","showChildrenEnd","showChildren","$levels","hideSiblingsEnd","$nodeContainer","nodeContainer","lines","$siblings","nextAll","prev","end","switchHorizontalArrow","$lines","showSiblingsEnd","visibleNodes","showRelatedParentEnd","showSiblings","$visibleNodes","startLoading","$edge","not","prop","endLoading","attr","$arrow","toggleClass","$prevSib","$nextSib","next","$sibs","sibsVisible","style","offsetWidth","nodeEnterLeaveHandler","flag","$topEdge","$bottomEdge","$leftEdge","nodeClickHandler","loadNodes","rel","isEmptyObject","addParent","addChildren","addSiblings","HideFirstParentEnd","topEdge","topEdgeClickHandler","stopPropagation","parentState","isFunction","bottomEdgeClickHandler","childrenState","hEdgeClickHandler","$hEdge","siblingsState","families","expandVNodesEnd","vNodes","collapseVNodesEnd","toggleVNodes","$toggleBtn","$descWrapper","$descendants","$children","createGhostNode","ghostNode","nodeCover","$nodeDiv","origEvent","isFirefox","test","navigator","userAgent","toLowerCase","querySelector","createElementNS","add","appendChild","transValues","isHorizontal","scale","setAttribute","outerWidth","outerHeight","xOffset","offsetX","yOffset","offsetY","ghostNodeWrapper","createElement","src","XMLSerializer","serializeToString","dataTransfer","setDragImage","filterAllowedDropNodes","$dragged","$dragZone","$dragHier","dropCriteria","dragstartHandler","setData","dragoverHandler","dropEffect","dragendHandler","dropHandler","$dropZone","dropEvent","draggedNode","dragZone","dropZone","isDefaultPrevented","dropColspan","horizontalEdges","before","$dropSibs","after","dragColspan","$dragSibs","touchstartHandler","touchHandled","touchMoved","innerText","touchmoveHandler","hasClass","simulateMouseEvent","$touchingNode","elementFromPoint","touchingNodeElement","touchTargetNode","touchendHandler","fakeEventForDropHandler","simulatedType","touch","changedTouches","simulatedEvent","createEvent","initMouseEvent","screenX","screenY","dispatchEvent","bindDragDrop","createNode","level","child","parentId","className","nodeTemplate","nodeContent","nodeData","verticalLevel","Number","substr","icon","prepend","$appendTo","parentsUntil","$nodeWrapper","childrenData","hasChildren","Object","keys","$nodesLayer","isHidden","collapsed","isVerticalLayer","$upperLines","lowerLines","$nodeCell","buildChildNode","buildParentNode","$currentRoot","$table","complementLine","$oneSibling","siblingCount","existingSibligCount","buildSiblingNode","$nodeChart","newSiblingCount","isArray","insertPostion","floor","$siblingTds","unwrap","removeNodes","$mask","sourceChart","html2canvas","width","clientHeight","clientWidth","height","onclone","cloneDoc","onrendered","canvas","doc","docWidth","docHeight","jsPDF","addImage","toDataURL","save","isWebkit","documentElement","isFf","sidebar","isEdge","appName","appVersion","msSaveBlob","msToBlob","selector","then","fn","orgchart"],"mappings":"AAUA,cAEC,SAAUA,GACa,iBAAXC,QAAiD,iBAAnBA,OAAOC,QAC9CF,EAAQG,QAAQ,UAAWC,OAAQC,UAEnCL,EAAQM,OAAQF,OAAQC,UAJ5B,CAME,SAAUE,EAAGH,EAAQC,EAAUG,GAC/B,IAAIC,EAAW,SAAUC,EAAMC,GAC7BC,KAAKC,gBAAkBN,EAAEG,GACzBE,KAAKD,KAAOA,EACZC,KAAKE,eAAiB,CACpBC,UAAa,OACbC,OAAU,KACVC,oBAAsB,EACtBC,aAAgB,IAChBC,WAAc,GACdC,cAAgB,EAChBC,eAAkB,WAClBC,oBAAuB,MACvBC,iBAAoB,WACpBC,WAAa,EACbC,UAAa,MACbC,KAAO,EACPC,MAAQ,EACRC,YAAe,EACfC,aAAgB,KAIpBpB,EAASqB,UAAY,CAEnBC,KAAM,SAAUpB,GACd,IAAIqB,EAAOpB,KACXA,KAAKqB,QAAU1B,EAAE2B,OAAO,GAAItB,KAAKE,eAAgBF,KAAKD,KAAMA,GAE5D,IAAIE,EAAkBD,KAAKC,gBACvBD,KAAKuB,QACPvB,KAAKuB,OAAOC,SAEd,IAAIC,EAAOzB,KAAKqB,QAAQI,KACpBF,EAASvB,KAAKuB,OAAS5B,EAAE,QAAS,CACpC8B,KAAQ,CAAEJ,QAAWrB,KAAKqB,SAC1BK,MAAS,YAA0C,KAA5B1B,KAAKqB,QAAQd,WAAoB,IAAMP,KAAKqB,QAAQd,WAAa,KAAkC,QAA3BP,KAAKqB,QAAQR,UAAsB,IAAMb,KAAKqB,QAAQR,U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KC,QAAQd,WAAa,IACjGN,EAAgB+B,KAAKgX,GAAUjX,QAClC9B,EAAgByC,OAAO,6BAA2D,KAA5BtB,EAAKC,QAAQd,WAAoB,IAAMa,EAAKC,QAAQd,WAAa,IAAM,eACzGE,EAAiB,cAEvCR,EAAgB+B,KAAKgX,GAAU/L,KAAK,OAAQ8K,EAAOM,aAAa,GAAG1W,aAK1EsX,KAAK,WACJhZ,EAAgBgC,YAAY,oBAC3B,WACDhC,EAAgBgC,YAAY,uBAKlCtC,EAAEuZ,GAAGC,SAAW,SAAUpZ,GACxB,OAAO,IAAIF,EAASG,KAAMD,GAAMoB","file":"jquery.orgchart.min.js","sourcesContent":["/*\n * jQuery OrgChart Plugin\n * https://github.com/dabeng/OrgChart\n *\n * Copyright 2016, dabeng\n * https://github.com/dabeng\n *\n * Licensed under the MIT license:\n * http://www.opensource.org/licenses/MIT\n */\n'use strict';\n\n(function (factory) {\n if (typeof module === 'object' && typeof module.exports === 'object') {\n factory(require('jquery'), window, document);\n } else {\n factory(jQuery, window, document);\n }\n}(function ($, window, document, undefined) {\n var OrgChart = function (elem, opts) {\n this.$chartContainer = $(elem);\n this.opts = opts;\n this.defaultOptions = {\n 'nodeTitle': 'name',\n 'nodeId': 'id',\n 'toggleSiblingsResp': false,\n 'visibleLevel': 999,\n 'chartClass': '',\n 'exportButton': false,\n 'exportFilename': 'OrgChart',\n 'exportFileextension': 'png',\n 'parentNodeSymbol': 'fa-users',\n 'draggable': false,\n 'direction': 't2b',\n 'pan': false,\n 'zoom': false,\n 'zoominLimit': 7,\n 'zoomoutLimit': 0.5\n };\n };\n //\n OrgChart.prototype = {\n //\n init: function (opts) {\n var that = this;\n this.options = $.extend({}, this.defaultOptions, this.opts, opts);\n // build the org-chart\n var $chartContainer = this.$chartContainer;\n if (this.$chart) {\n this.$chart.remove();\n }\n var data = this.options.data;\n var $chart = this.$chart = $('
    ', {\n 'data': { 'options': this.options },\n 'class': 'orgchart' + (this.options.chartClass !== '' ? ' ' + this.options.chartClass : '') + (this.options.direction !== 't2b' ? ' ' + this.options.direction : ''),\n 'click': function(event) {\n if (!$(event.target).closest('.node').length) {\n $chart.find('.node.focused').removeClass('focused');\n }\n }\n });\n if (typeof MutationObserver !== 'undefined') {\n this.triggerInitEvent();\n }\n if ($.type(data) === 'object') {\n if (data instanceof $) { // ul datasource\n this.buildHierarchy($chart, this.buildJsonDS(data.children()), 0, this.options);\n } else { // local json datasource\n this.buildHierarchy($chart, this.options.ajaxURL ? data : this.attachRel(data, '00'));\n }\n } else {\n $chart.append('');\n $.ajax({\n 'url': data,\n 'dataType': 'json'\n })\n .done(function(data, textStatus, jqXHR) {\n that.buildHierarchy($chart, that.options.ajaxURL ? data : that.attachRel(data, '00'), 0, that.options);\n })\n .fail(function(jqXHR, textStatus, errorThrown) {\n console.log(errorThrown);\n })\n .always(function() {\n $chart.children('.spinner').remove();\n });\n }\n $chartContainer.append($chart);\n\n // append the export button\n if (this.options.exportButton && !$chartContainer.find('.oc-export-btn').length) {\n this.attachExportButton();\n }\n\n if (this.options.pan) {\n this.bindPan();\n }\n\n if (this.options.zoom) {\n this.bindZoom();\n }\n\n return this;\n },\n //\n triggerInitEvent: function () {\n var that = this;\n var mo = new MutationObserver(function (mutations) {\n mo.disconnect();\n initTime:\n for (var i = 0; i < mutations.length; i++) {\n for (var j = 0; j < mutations[i].addedNodes.length; j++) {\n if (mutations[i].addedNodes[j].classList.contains('orgchart')) {\n if (that.options.initCompleted && typeof that.options.initCompleted === 'function') {\n that.options.initCompleted(that.$chart);\n var initEvent = $.Event('init.orgchart');\n that.$chart.trigger(initEvent);\n break initTime;\n }\n }\n }\n }\n });\n mo.observe(this.$chartContainer[0], { childList: true });\n },\n //\n attachExportButton: function () {\n var that = this;\n var $exportBtn = $('
    ');\n $appendTo.append($nodeWrapper.append($('').append($('').append($nodeDiv))));\n }\n }\n // Construct the lower level(two \"connectiong lines\" rows and \"inferior nodes\" row)\n if (hasChildren) {\n var isHidden = (level + 1 > opts.visibleLevel || data.collapsed) ? ' hidden' : '';\n var isVerticalLayer = (opts.verticalLevel && (level + 1) >= opts.verticalLevel) ? true : false;\n var $nodesLayer;\n if (isVerticalLayer) {\n $nodesLayer = $('
      ');\n if (isHidden && level + 1 > opts.verticalLevel) {\n $nodesLayer.addClass(isHidden);\n }\n if (level + 1 === opts.verticalLevel) {\n $appendTo.children('table').append('
    ')\n .find('.verticalNodes').children().append($nodesLayer);\n } else {\n $appendTo.append($nodesLayer);\n }\n } else {\n var $upperLines = $('');\n var lowerLines = '';\n for (var i=1; i');\n if (Object.keys(data).length === 2) {\n $appendTo.append($upperLines).append(lowerLines).append($nodesLayer);\n } else {\n $nodeWrapper.append($upperLines).append(lowerLines).append($nodesLayer);\n }\n }\n // recurse through children nodes\n $.each(childrenData, function () {\n var $nodeCell = isVerticalLayer ? $('
  • ') : $('
  • ');\n $nodesLayer.append($nodeCell);\n this.level = level + 1;\n that.buildHierarchy($nodeCell, this);\n });\n }\n },\n // build the child nodes of specific node\n buildChildNode: function ($appendTo, data) {\n $appendTo.find('td:first').attr('colspan', data.length * 2);\n this.buildHierarchy($appendTo, { 'children': data });\n },\n // exposed method\n addChildren: function ($node, data) {\n this.buildChildNode($node.closest('table'), data);\n if (!$node.children('.bottomEdge').length) {\n $node.append('');\n }\n if (!$node.find('.symbol').length) {\n $node.children('.title').prepend('');\n }\n if (this.isInAction($node)) {\n this.switchVerticalArrow($node.children('.bottomEdge'));\n }\n },\n // build the parent node of specific node\n buildParentNode: function ($currentRoot, data) {\n data.relationship = data.relationship || '001';\n var $table = $('')\n .append($('').append($('')\n .append('');\n this.$chart.prepend($table)\n .children('table:first').append('')\n .children('tr:last').children().append(this.$chart.children('table').last());\n },\n // exposed method\n addParent: function ($currentRoot, data) {\n this.buildParentNode($currentRoot, data);\n if (!$currentRoot.children('.topEdge').length) {\n $currentRoot.children('.title').after('');\n }\n if (this.isInAction($currentRoot)) {\n this.switchVerticalArrow($currentRoot.children('.topEdge'));\n }\n },\n // subsequent processing of build sibling nodes\n complementLine: function ($oneSibling, siblingCount, existingSibligCount) {\n var lines = '';\n for (var i = 0; i < existingSibligCount; i++) {\n lines += '';\n }\n $oneSibling.parent().prevAll('tr:gt(0)').children().attr('colspan', siblingCount * 2)\n .end().next().children(':first').after(lines);\n },\n // build the sibling nodes of specific node\n buildSiblingNode: function ($nodeChart, data) {\n var newSiblingCount = $.isArray(data) ? data.length : data.children.length;\n var existingSibligCount = $nodeChart.parent().is('td') ? $nodeChart.closest('tr').children().length : 1;\n var siblingCount = existingSibligCount + newSiblingCount;\n var insertPostion = (siblingCount > 1) ? Math.floor(siblingCount/2 - 1) : 0;\n // just build the sibling nodes for the specific node\n if ($nodeChart.parent().is('td')) {\n var $parent = $nodeChart.closest('tr').prevAll('tr:last');\n $nodeChart.closest('tr').prevAll('tr:lt(2)').remove();\n this.buildChildNode($nodeChart.parent().closest('table'), data);\n var $siblingTds = $nodeChart.parent().closest('table').children('tr:last').children('td');\n if (existingSibligCount > 1) {\n this.complementLine($siblingTds.eq(0).before($nodeChart.closest('td').siblings().addBack().unwrap()), siblingCount, existingSibligCount);\n } else {\n this.complementLine($siblingTds.eq(insertPostion).after($nodeChart.closest('td').unwrap()), siblingCount, 1);\n }\n } else { // build the sibling nodes and parent node for the specific ndoe\n this.buildHierarchy($nodeChart.closest('.orgchart'), data);\n this.complementLine($nodeChart.next().children('tr:last').children().eq(insertPostion).after($('
    ').append(this.createNode(data))))\n .append('
    ').append($nodeChart)),\n siblingCount, 1);\n }\n },\n //\n addSiblings: function ($node, data) {\n this.buildSiblingNode($node.closest('table'), data);\n $node.closest('.nodes').data('siblingsLoaded', true);\n if (!$node.children('.leftEdge').length) {\n $node.children('.topEdge').after('');\n }\n if (this.isInAction($node)) {\n this.switchHorizontalArrow($node);\n $node.children('.topEdge').removeClass('fa-chevron-up').addClass('fa-chevron-down');\n }\n },\n //\n removeNodes: function ($node) {\n var $parent = $node.closest('table').parent();\n var $sibs = $parent.parent().siblings();\n if ($parent.is('td')) {\n if (this.getNodeState($node, 'siblings').exist) {\n $sibs.eq(2).children('.topLine:lt(2)').remove();\n $sibs.slice(0, 2).children().attr('colspan', $sibs.eq(2).children().length);\n $parent.remove();\n } else {\n $sibs.eq(0).children().removeAttr('colspan')\n .find('.bottomEdge').remove()\n .end().end().siblings().remove();\n }\n } else {\n $parent.add($parent.siblings()).remove();\n }\n },\n //\n export: function (exportFilename, exportFileextension) {\n var that = this;\n exportFilename = (typeof exportFilename !== 'undefined') ? exportFilename : this.options.exportFilename;\n exportFileextension = (typeof exportFileextension !== 'undefined') ? exportFileextension : this.options.exportFileextension;\n if ($(this).children('.spinner').length) {\n return false;\n }\n var $chartContainer = this.$chartContainer;\n var $mask = $chartContainer.find('.mask');\n if (!$mask.length) {\n $chartContainer.append('
    ');\n } else {\n $mask.removeClass('hidden');\n }\n var sourceChart = $chartContainer.addClass('canvasContainer').find('.orgchart:not(\".hidden\")').get(0);\n var flag = that.options.direction === 'l2r' || that.options.direction === 'r2l';\n html2canvas(sourceChart, {\n 'width': flag ? sourceChart.clientHeight : sourceChart.clientWidth,\n 'height': flag ? sourceChart.clientWidth : sourceChart.clientHeight,\n 'onclone': function (cloneDoc) {\n $(cloneDoc).find('.canvasContainer').css('overflow', 'visible')\n .find('.orgchart:not(\".hidden\"):first').css('transform', '');\n },\n 'onrendered': function (canvas) {\n $chartContainer.find('.mask').addClass('hidden');\n if (exportFileextension.toLowerCase() === 'pdf') {\n var doc = {};\n var docWidth = Math.floor(canvas.width * 0.2646);\n var docHeight = Math.floor(canvas.height * 0.2646);\n if (docWidth > docHeight) {\n doc = new jsPDF('l', 'mm', [docWidth, docHeight]);\n } else {\n doc = new jsPDF('p', 'mm', [docHeight, docWidth]);\n }\n doc.addImage(canvas.toDataURL(), 'png', 0, 0);\n doc.save(exportFilename + '.pdf');\n } else {\n var isWebkit = 'WebkitAppearance' in document.documentElement.style;\n var isFf = !!window.sidebar;\n var isEdge = navigator.appName === 'Microsoft Internet Explorer' || (navigator.appName === \"Netscape\" && navigator.appVersion.indexOf('Edge') > -1);\n\n if ((!isWebkit && !isFf) || isEdge) {\n window.navigator.msSaveBlob(canvas.msToBlob(), exportFilename + '.png');\n } else {\n var selector = '.oc-download-btn' + (that.options.chartClass !== '' ? '.' + that.options.chartClass : '');\n if (!$chartContainer.find(selector).length) {\n $chartContainer.append('');\n }\n $chartContainer.find(selector).attr('href', canvas.toDataURL())[0].click();\n }\n }\n }\n })\n .then(function () {\n $chartContainer.removeClass('canvasContainer');\n }, function () {\n $chartContainer.removeClass('canvasContainer');\n });\n }\n };\n\n $.fn.orgchart = function (opts) {\n return new OrgChart(this, opts).init();\n };\n\n}));\n"]} \ No newline at end of file diff --git a/package.json b/package.json index 419a4eee..d21a12bb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "orgchart", - "version": "2.1.2", + "version": "2.1.3", "description": "Simple and direct organization chart(tree-like hierarchy) plugin based on pure DOM and jQuery.", "main": "./dist/js/jquery.orgchart.min.js", "style": [ diff --git a/src/js/jquery.orgchart.js b/src/js/jquery.orgchart.js index 10fdbee8..2b41bd41 100644 --- a/src/js/jquery.orgchart.js +++ b/src/js/jquery.orgchart.js @@ -892,9 +892,6 @@ var opts = this.options; var origEvent = event.originalEvent; var isFirefox = /firefox/.test(window.navigator.userAgent.toLowerCase()); - if (isFirefox) { - origEvent.dataTransfer.setData('text/html', 'hack for firefox'); - } var ghostNode, nodeCover; if (!document.querySelector('.ghost-node')) { ghostNode = document.createElementNS("http://www.w3.org/2000/svg", "svg"); @@ -907,9 +904,10 @@ nodeCover = $(ghostNode).children().get(0); } var transValues = $nodeDiv.closest('.orgchart').css('transform').split(','); - var scale = Math.abs(window.parseFloat((opts.direction === 't2b' || opts.direction === 'b2t') ? transValues[0].slice(transValues[0].indexOf('(') + 1) : transValues[1])); - ghostNode.setAttribute('width', $nodeDiv.outerWidth(false)); - ghostNode.setAttribute('height', $nodeDiv.outerHeight(false)); + var isHorizontal = opts.direction === 't2b' || opts.direction === 'b2t'; + var scale = Math.abs(window.parseFloat(isHorizontal ? transValues[0].slice(transValues[0].indexOf('(') + 1) : transValues[1])); + ghostNode.setAttribute('width', isHorizontal ? $nodeDiv.outerWidth(false) : $nodeDiv.outerHeight(false)); + ghostNode.setAttribute('height', isHorizontal ? $nodeDiv.outerHeight(false) : $nodeDiv.outerWidth(false)); nodeCover.setAttribute('x',5 * scale); nodeCover.setAttribute('y',5 * scale); nodeCover.setAttribute('width', 120 * scale); @@ -959,6 +957,7 @@ }, // dragstartHandler: function (event) { + event.originalEvent.dataTransfer.setData('text/html', 'hack for firefox'); // if users enable zoom or direction options if (this.$chart.css('transform') !== 'none') { this.createGhostNode(event);