diff --git a/bower.json b/bower.json index 055984c..58626d7 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "angular-d3-word-cloud", - "version": "0.4.0", + "version": "0.5.0", "description": "An AngularJS directive for angular-d3-word-cloud.js base on d3.js", "main": ["dist/angular-d3-word-cloud.js"], "authors": [ diff --git a/dist/angular-word-cloud.js b/dist/angular-word-cloud.js index ba6a335..2333e05 100644 --- a/dist/angular-word-cloud.js +++ b/dist/angular-word-cloud.js @@ -1,5 +1,5 @@ /* - * angular-d3-word-cloud 0.4.0 + * angular-d3-word-cloud 0.5.0 * Running example base on express server * https://weihanchen.github.io/angular-d3-word-cloud/ * diff --git a/dist/angular-word-cloud.min.js b/dist/angular-word-cloud.min.js index f4b98ca..d293523 100644 --- a/dist/angular-word-cloud.min.js +++ b/dist/angular-word-cloud.min.js @@ -1 +1,9 @@ +/* + * angular-d3-word-cloud 0.5.0 + * Running example base on express server + * https://weihanchen.github.io/angular-d3-word-cloud/ + * + * Released under the MIT license. +*/ + !function(){"use strict";function t(){function t(t,e){function n(){return 60*~~(2*Math.random())}function i(t){var n=d3.select(e[0]),i=u.size()[0],o=u.size()[1];n.select("svg").remove(),n.append("svg").attr("width",i).attr("height",o).append("g").attr("transform","translate("+i/2+","+o/2+")").selectAll("text").data(t).enter().append("text").on("click",function(t){a.onClick&&a.onClick(t)}).on("mouseover",function(t){a.useTooltip&&d.style("font-size",t.size+"px").style("visibility","visible").text(t.tooltipText||t.text),a.useTransition&&d3.select(this).transition().style("font-size",function(t){return 1.2*t.size+"px"}).attr("opacity",.5)}).on("mouseout",function(){d.style("visibility","hidden"),a.useTransition&&d3.select(this).transition().style("font-size",function(t){return t.size+"px"}).attr("opacity",1)}).on("mousemove",function(){return d.style("top",event.pageY-10+"px").style("left",event.pageX+10+"px")}).style("font-size",function(t){return t.size+"px"}).style("font-family","Impact").style("fill",function(t,e){return t.color||l(e)}).attr("text-anchor","middle").attr("cursor","pointer").transition().attr("transform",function(t){return"translate("+[t.x,t.y]+")rotate("+t.rotate+")"}).text(function(t){return t.text})}function o(t,e,i,o,r){o=o||5,r=r||n,u.size([t,e]).rotate(r).padding(o).words(i),u.start()}function r(){return a}function s(t){var e=angular.copy(t);angular.isUndefined(e.words)||angular.isUndefined(e.width)||angular.isUndefined(e.height)||o(e.width,e.height,e.words,e.padding,e.rotate)}var a=this,l=d3.hasOwnProperty("scale")?d3.scale.category20():d3.scaleOrdinal(d3.schemeCategory20),d=d3.select("body").append("div").style("position","absolute").style("visibility","hidden"),u=d3.layout.cloud().fontSize(function(t){return t.size}).on("end",i);t.$watch(r,s,!0)}return{restrict:"E",scope:{height:"=",padding:"=?",rotate:"=?",useTooltip:"=?",useTransition:"=?",words:"=",width:"=",onClick:"="},template:"
",controller:["$scope","$element",t],controllerAs:"wordsCloudCtrl",bindToController:!0}}angular.module("angular-d3-word-cloud",[]).directive("wordCloud",[t])}(); \ No newline at end of file diff --git a/gulpfile.js b/gulpfile.js index 1cfcd88..3dc8285 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -33,7 +33,11 @@ gulp.task('toDist', function() { .pipe(gulp.dest('docs/dist')) .pipe(concat('angular-word-cloud.min.js')).pipe(ngAnnotate()).pipe(uglify({ mangle: true - })).pipe(gulp.dest('dist')) + })) + .pipe(banner(comment, { + pkg: pkg + })) + .pipe(gulp.dest('dist')) .pipe(gulp.dest('docs/dist')); }); diff --git a/package.json b/package.json index c67d7cf..d089200 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "angular-d3-word-cloud", "description": "Running example base on express server", - "version": "0.4.0", + "version": "0.5.0", "license": "MIT", "homepage": "https://weihanchen.github.io/angular-d3-word-cloud/", "author": {