/*! * ==================================================== * kityminder - v1.3.5 - 2015-05-15 * https://github.com/fex-team/kityminder * GitHub: https://github.com/fex-team/kityminder.git * Copyright (c) 2015 f-cube @ FEX; Licensed MIT * ==================================================== */ !function(window){function getMetaKeyCode(a){var b=4096,c=8192,d=16384,e=0;return"string"==typeof a?a.toLowerCase().split(/\+\s*/).forEach(function(a){switch(a){case"ctrl":case"cmd":e|=b;break;case"alt":e|=c;break;case"shift":e|=d;break;default:e|=keymap[a]}}):((a.ctrlKey||a.metaKey)&&(e|=b),a.altKey&&(e|=c),a.shiftKey&&(e|=d),e|=a.keyCode),e}function updateCircle(a,b,c){var d=b.getStyle("padding-left"),e=b.getStyle("padding-right"),f=b.getStyle("padding-top"),g=b.getStyle("padding-bottom"),h=Math.max(c.width,c.height),i={x:c.x-d,y:c.y-f,width:h+d+e,height:h+f+g},j=b.isSelected()?"selected-":"";return h=Math.max(i.width,i.height),a.setPosition(i.x,i.y).setSize(h,h).setRadius(h/2).fill(b.getData("background")||b.getStyle(j+"background")||b.getStyle("background")).stroke(b.getStyle(j+"stroke"||b.getStyle("stroke")),b.getStyle(j+"stroke-width")),new kity.Box(i)}function addParentPointer(a){var b=a.exportJson();return AddParent(b)}function AddParent(a){return a.children&&$.each(a.children,function(b,c){c.parent=a,AddParent(c)}),a}function renderNodeData(a,b,c){var d=createRootNode(a,b),e=$('