-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathangular-viz.min.js
More file actions
1 lines (1 loc) · 1.38 KB
/
angular-viz.min.js
File metadata and controls
1 lines (1 loc) · 1.38 KB
1
(function(){var e,n,t,i,r,o,l,u;"function"==typeof require&&require("angular"),"function"==typeof require&&require("viz"),n=("undefined"!=typeof global&&null!==global?global.angular:void 0)||("undefined"!=typeof window&&null!==window?window.angular:void 0),e=("undefined"!=typeof global&&null!==global?global.Viz:void 0)||("undefined"!=typeof window&&null!==window?window.Viz:void 0),l=n.module("atVizJs",[]),t={format:"svg",engine:"dot"},u=function(i,r){var o,l,u,a,d;for(null==r&&(r={}),r=n.extend({},t,r),o={},d=["format","engine"],u=0,a=d.length;a>u;u++)l=d[u],o[l]=r[l],delete r[l];return e(i,o.format,o.engine,r)},r=function(e,t,i){var r,o;null==i&&(i={}),r=n.element(t),o=u(e,i),r.html(o)},i=function(e,n,t){return r(t.dot||n.text(),n,t)},o=function(){},l.provider("vizJs",function(){this.option=function(e){return t=n.extend(t,e),this},this.enableLanguageDirective=function(){return o=i,this},this.$get=function(){return{render:u,draw:r}}}),l.directive("dot",function(){return{restrict:"E",scope:!0,transclude:!0,replace:!0,template:'<div ng-bind-html="diagram" class="at-viz-js"></div>',controller:["$scope","$element","$attrs","$transclude","$sce",function(e,n,t,i,r){var o;return o=u(t.dot||i().text(),t),e.diagram=r.trustAsHtml(o)}]}}),l.directive("dot",function(){return{restrict:"A",template:"",link:i}}),l.directive("languageDot",function(){return{restrict:"C",template:"",link:o}})}).call(this);