From 15e042b119bcf9191597ee38e8301a0d81acab95 Mon Sep 17 00:00:00 2001 From: Bart Mesuere Date: Fri, 18 May 2018 14:28:25 +0200 Subject: [PATCH] bump version --- dist/unipept-visualizations.min.js | 2 +- package.json | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dist/unipept-visualizations.min.js b/dist/unipept-visualizations.min.js index 116c088..36162ae 100644 --- a/dist/unipept-visualizations.min.js +++ b/dist/unipept-visualizations.min.js @@ -1,4 +1,4 @@ -/*! unipept-visualizations 1.6.1 18-05-2018 */ +/*! unipept-visualizations 1.7.0 18-05-2018 */ "use strict";var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a};!function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={exports:{},id:d,loaded:!1};return a[d].call(e.exports,e,e.exports,b),e.loaded=!0,e.exports}var c={};b.m=a,b.c=c,b.p="",b(0)}([function(a,b,c){function d(a){return a&&a.__esModule?a:{default:a}}var e=c(1),f=(d(e),c(6)),g=(d(f),c(8));d(g)},function(a,b,c){function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b){function c(){I=d3.select("body").append("div").attr("id",a.id+"-tooltip").attr("class","tip").style("position","absolute").style("z-index","10").style("visibility","hidden").style("background-color","white").style("padding","2px").style("border","1px solid #dddddd").style("border-radius","3px;")}function d(){var a=d3.scale.linear().range([0,2*Math.PI]);L=d3.svg.arc().outerRadius(k).startAngle(0).endAngle(function(b){return a(b.data.self_count/b.data.count)||0})}function e(a){var b=this;K.domain([0,a.data.count]),G=a,G.x0=C.height/2,G.y0=0,G.setSelected(!0),G.children.forEach(function(a,c){a.color=d3.functor(C.colors).call(b,a,c),a.setRecursiveProperty("color",a.color)}),C.enableExpandOnClick?(G.collapseAll(),g(G)):G.expandAll(),i(G),p(G)}function g(a){if(!C.enableAutoExpand)return void a.expand();a.expand(1);for(var b=a.data.count*(isFinite(C.enableAutoExpand)?C.enableAutoExpand:.8),c=new j.default(a.children||[]);b>0&&c.size>0;){var d=c.remove();b-=d.data.count,d.expand(1),(d.children||[]).forEach(function(a){return c.add(a)})}}function i(a){var b=H.nodes(G).reverse(),c=H.links(b);b.forEach(function(a){a.y=a.depth*C.nodeDistance});var d=N.selectAll("g.node").data(b,function(a){return a.id||(a.id=++F)}),e=d.enter().append("g").attr("class","node").style("cursor","pointer").attr("transform",function(b){return"translate("+(a.y||0)+","+(a.x0||0)+")"}).on("click",m).on("mouseover",q).on("mouseout",r).on("contextmenu",n);e.append("circle").attr("r",1e-6).style("stroke-width","1.5px").style("stroke",C.nodeStrokeColor).style("fill",C.nodeFillColor),C.enableInnerArcs&&e.append("path").attr("d",L).style("fill",C.nodeStrokeColor).style("fill-opacity",0),C.enableLabels&&e.append("text").attr("x",function(a){return a.isLeaf()?10:-10}).attr("dy",".35em").attr("text-anchor",function(a){return a.isLeaf()?"start":"end"}).text(C.getLabel).style("font","10px sans-serif").style("fill-opacity",1e-6);var f=d.transition().duration(z).attr("transform",function(a){return"translate("+a.y+","+a.x+")"});f.select("circle").attr("r",k).style("fill-opacity",function(a){return a._children?1:0}).style("stroke",C.nodeStrokeColor).style("fill",C.nodeFillColor),C.enableLabels&&f.select("text").style("fill-opacity",1),C.enableInnerArcs&&f.select("path").duration(z).attr("d",L).style("fill-opacity",.8);var g=d.exit().transition().duration(z).attr("transform",function(b){return"translate("+a.y+","+a.x+")"}).remove();g.select("circle").attr("r",1e-6),g.select("path").style("fill-opacity",1e-6),g.select("text").style("fill-opacity",1e-6);var h=N.selectAll("path.link").data(c,function(a){return a.target.id});h.enter().insert("path","g").attr("class","link").style("fill","none").style("stroke-opacity","0.5").style("stroke-linecap","round").style("stroke",C.linkStrokeColor).style("stroke-width",1e-6).attr("d",function(b){var c={x:a.x0||0,y:a.y0||0};return J({source:c,target:c})}),h.transition().duration(z).attr("d",J).style("stroke",C.linkStrokeColor).style("stroke-width",function(a){return a.source.selected?K(a.target.data.count)+"px":"4px"}),h.exit().transition().duration(z).style("stroke-width",1e-6).attr("d",function(b){var c={x:a.x,y:a.y};return J({source:c,target:c})}).remove(),b.forEach(function(a){var b=[a.x,a.y];a.x0=b[0],a.y0=b[1]})}function k(a){return a.selected?K(a.data.count)/2:2}function m(a){C.enableExpandOnClick&&(d3.event.defaultPrevented||(d3.event.shiftKey?a.expandAll():a.children?a.collapse():a.expand(),i(a),p(a)))}function n(a){C.enableRightClick&&o(a)}function o(a){if(a===D&&a!==G)return void o(G);D=a,G.setSelected(!1),a.setSelected(!0),K.domain([0,a.data.count]),a.expand(),null!==d3.event&&d3.event.preventDefault(),i(a),p(a),C.rerootCallback&&C.rerootCallback.call(null,a)}function p(a){var b=M.scale(),c=-a.y0,d=-a.x0;c=c*b+C.width/4,d=d*b+C.height/2,N.transition().duration(z).attr("transform","translate("+c+","+d+")scale("+b+")"),M.scale(b),M.translate([c,d])}function q(a,b){C.enableTooltips&&(I.html(C.getTooltip(a)).style("top",d3.event.pageY-5+"px").style("left",d3.event.pageX+15+"px"),E=setTimeout(function(){I.style("visibility","visible")},1e3))}function r(a,b){C.enableTooltips&&(clearTimeout(E),I.style("visibility","hidden"))}function s(a){return a.selected?a._children?a.color||"#aaa":"#fff":"#aaa"}function t(a){return a.selected?a.color||"#aaa":"#aaa"}function u(a){return a.source.selected?a.target.color:"#aaa"}function v(a){return"

"+C.getTooltipTitle(a)+"

"+C.getTooltipText(a)+"

"}var w=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},x={},y={top:5,right:5,bottom:5,left:5},z=750,A=d3.scale.category10(),B={height:300,width:600,nodeDistance:180,levelsToExpand:2,minNodeSize:2,maxNodeSize:105,countAccessor:function(a){return a.data.count},rerootCallback:void 0,colors:function(a){return A(a.name)},nodeFillColor:s,nodeStrokeColor:t,linkStrokeColor:u,enableInnerArcs:!0,enableExpandOnClick:!0,enableRightClick:!0,enableLabels:!0,getLabel:function(a){return a.name},enableTooltips:!0,getTooltip:v,getTooltipTitle:h.default.getTooltipTitle,getTooltipText:h.default.getTooltipText,enableAutoExpand:!1},C=void 0,D=void 0,E=void 0,F=0,G=void 0,H=void 0,I=void 0,J=void 0,K=void 0,L=void 0,M=void 0,N=void 0;return x.reset=function(){M.scale(1),o(G)},x.setFullScreen=function(b){setTimeout(function(){var c=[C.width,C.height],d=c[0],e=c[1];b&&(d=$(window).width(),e=$(window).height()-44),$(a).children("svg").attr("width",d).attr("height",e)},1e3)},x.getRoot=function(){return G},x.update=i,x.centerNode=p,function(){C=f({},B,w),l.default.settings=C,C.width=C.width-y.right-y.left,C.height=C.height-y.top-y.bottom,C.enableTooltips&&c(),C.enableInnerArcs&&d(),H=d3.layout.tree().nodeSize([2,10]).separation(function(a,b){var c=k(a)+k(b),d=c/2+4;return a.parent===b.parent?d:d+4}),J=d3.svg.diagonal().projection(function(a){return[a.y,a.x]}),K=d3.scale.linear().range([C.minNodeSize,C.maxNodeSize]),M=d3.behavior.zoom().scaleExtent([.1,3]).on("zoom",function(){N.attr("transform","translate("+d3.event.translate+")scale("+d3.event.scale+")")}),N=d3.select(a).append("svg").attr("version","1.1").attr("xmlns","http://www.w3.org/2000/svg").attr("viewBox","0 0 "+(C.width+y.right+y.left)+" "+(C.height+y.top+y.bottom)).attr("width",C.width+y.right+y.left).attr("height",C.height+y.top+y.bottom).call(M).append("g").attr("transform","translate("+y.left+","+y.top+")").append("g"),e(l.default.createNode(b))}(),x}Object.defineProperty(b,"__esModule",{value:!0});var f=Object.assign||function(a){for(var b=1;b=0;b--)f(a,h);return a}function e(a,b){for(var c=a[b];b>0;){var d=Math.floor((b-1)/2),e=a[d];if(!(h(c,e)<0))break;a[b]=e,b=d}return a[b]=c,b}function f(a,b){for(var c=a[b],d=a.length;2*b+10&&void 0!==arguments[0]?arguments[0]:[];c(this,a),this._data=d(Array.from(b))}return g(a,[{key:"add",value:function(a){return this._data.push(a),e(this._data,this.size-1),this}},{key:"peek",value:function(){return this._data[0]}},{key:"remove",value:function(){var a=this._data[0];return this.size>1?(this._data[0]=this._data.pop(),f(this._data,0)):this._data.pop(),a}},{key:"clear",value:function(){this._data=[]}},{key:"size",get:function(){return this._data.length}}]),a}();b.default=i},function(a,b,c){function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function e(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!==(void 0===b?"undefined":_typeof(b))&&"function"!=typeof b?a:b}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+(void 0===b?"undefined":_typeof(b)));a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0});var g=function(){function a(a,b){for(var c=0;c0&&void 0!==arguments[0]?arguments[0]:{};d(this,b);var c=e(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,a));return c.settings=b.settings,c.setCount(),c}return f(b,a),g(b,[{key:"setCount",value:function(){this.settings.countAccessor(this)?this.data.count=this.settings.countAccessor(this):this.children?this.data.count=this.children.reduce(function(a,b){return a+b.data.count},0):this.data.count=0}},{key:"setSelected",value:function(a){this.setRecursiveProperty("selected",a)}},{key:"collapseAll",value:function(){this.children&&0===this.children.length&&(this.children=null),this.children&&(this._children=this.children,this._children.forEach(function(a){a.collapseAll()}),this.children=null)}},{key:"collapse",value:function(){this.children&&(this._children=this.children,this.children=null)}},{key:"expandAll",value:function(){this.expand(100)}},{key:"expand",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.settings.levelsToExpand;a>0&&(this._children&&(this.children=this._children,this._children=null),this.children&&this.children.forEach(function(b){b.expand(a-1)}))}}],[{key:"new",value:function(){return new b(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})}},{key:"createNode",value:function(a){return i.default.createNode(a,b.new)}}]),b}(i.default);b.default=j},function(a,b){function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0});var d=Object.assign||function(a){for(var b=1;b0&&void 0!==arguments[0]?arguments[0]:{};c(this,a),this.data={},d(this,b)}return e(a,[{key:"setRecursiveProperty",value:function(a,b){this[a]=b,this.children?this.children.forEach(function(c){c.setRecursiveProperty(a,b)}):this._children&&this._children.forEach(function(c){c.setRecursiveProperty(a,b)})}},{key:"isLeaf",value:function(){return!this.children&&!this._children||this.children&&0===this.children.length||this._children&&0===this._children.length}},{key:"getHeight",value:function(){return void 0===this._height&&(this.isLeaf()?this._height=0:this._height=d3.max(this.children,function(a){return a.getHeight()})+1),this._height}},{key:"getDepth",value:function(){return void 0===this._depth&&(void 0===this.parent?this._depth=0:this._depth=this.parent.getDepth()+1),this._depth}}],[{key:"new",value:function(){return new a(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})}},{key:"createNode",value:function(b){var c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.new;return b.children&&(b.children=b.children.map(function(b){return a.createNode(b,c)})),c.call(null,b)}}]),a}();b.default=f},function(a,b,c){function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b){function c(){C=d3.select("body").append("div").attr("id",a.id+"-tooltip").attr("class","tip").style("position","absolute").style("z-index","10").style("visibility","hidden").style("background-color","white").style("padding","2px").style("border","1px solid #dddddd").style("border-radius","3px;")}function d(){var b=v.className;$(a).addClass(b),$("