Fix group boxes too small for multiline labels (#632)
This commit is contained in:
1 parent
607347ff18
commit
836d9f40d7
3 files changed
+22
-13
No files matched your search
@@ -1,8 +1,8 @@
|
||||
(()=>{var _n=Object.create;var It=Object.defineProperty,En=Object.defineProperties,xn=Object.getOwnPropertyDescriptor,Cn=Object.getOwnPropertyDescriptors,Tn=Object.getOwnPropertyNames,Yi=Object.getOwnPropertySymbols,kn=Object.getPrototypeOf,Ui=Object.prototype.hasOwnProperty,Sn=Object.prototype.propertyIsEnumerable;var ti=(r,e,t)=>e in r?It(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,be=(r,e)=>{for(var t in e||(e={}))Ui.call(e,t)&&ti(r,t,e[t]);if(Yi)for(var t of Yi(e))Sn.call(e,t)&&ti(r,t,e[t]);return r},We=(r,e)=>En(r,Cn(e)),On=r=>It(r,"__esModule",{value:!0});var In=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports);var Pn=(r,e,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of Tn(e))!Ui.call(r,s)&&s!=="default"&&It(r,s,{get:()=>e[s],enumerable:!(t=xn(e,s))||t.enumerable});return r},Xi=r=>Pn(On(It(r!=null?_n(kn(r)):{},"default",r&&r.__esModule&&"default"in r?{get:()=>r.default,enumerable:!0}:{value:r,enumerable:!0})),r);var se=(r,e,t)=>(ti(r,typeof e!="symbol"?e+"":e,t),t);var Gi=(r,e,t)=>new Promise((s,o)=>{var n=h=>{try{d(t.next(h))}catch(l){o(l)}},a=h=>{try{d(t.throw(h))}catch(l){o(l)}},d=h=>h.done?s(h.value):Promise.resolve(h.value).then(n,a);d((t=t.apply(r,e)).next())});var si=In((Ha,ii)=>{typeof ii!="undefined"&&(ii.exports=ce);function ce(r){if(r)return Dn(r)}function Dn(r){for(var e in ce.prototype)r[e]=ce.prototype[e];return r}ce.prototype.on=ce.prototype.addEventListener=function(r,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+r]=this._callbacks["$"+r]||[]).push(e),this};ce.prototype.once=function(r,e){function t(){this.off(r,t),e.apply(this,arguments)}return t.fn=e,this.on(r,t),this};ce.prototype.off=ce.prototype.removeListener=ce.prototype.removeAllListeners=ce.prototype.removeEventListener=function(r,e){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var t=this._callbacks["$"+r];if(!t)return this;if(arguments.length==1)return delete this._callbacks["$"+r],this;for(var s,o=0;o<t.length;o++)if(s=t[o],s===e||s.fn===e){t.splice(o,1);break}return t.length===0&&delete this._callbacks["$"+r],this};ce.prototype.emit=function(r){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),t=this._callbacks["$"+r],s=1;s<arguments.length;s++)e[s-1]=arguments[s];if(t){t=t.slice(0);for(var s=0,o=t.length;s<o;++s)t[s].apply(this,e)}return this};ce.prototype.listeners=function(r){return this._callbacks=this._callbacks||{},this._callbacks["$"+r]||[]};ce.prototype.hasListeners=function(r){return!!this.listeners(r).length}});var Ds=Xi(si());function ve(){return ve=Object.assign||function(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(r[s]=t[s])}return r},ve.apply(this,arguments)}function pe(r,e){r.prototype=Object.create(e.prototype),r.prototype.constructor=r,r.__proto__=e}function Pt(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}var oi;typeof Object.assign!="function"?oi=function(e){if(e==null)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),s=1;s<arguments.length;s++){var o=arguments[s];if(o!=null)for(var n in o)o.hasOwnProperty(n)&&(t[n]=o[n])}return t}:oi=Object.assign;var Ve=oi,Ki=["","webkit","Moz","MS","ms","o"],Mn=typeof document=="undefined"?{style:{}}:document.createElement("div"),Nn="function",tt=Math.round,qe=Math.abs,ni=Date.now;function Dt(r,e){for(var t,s,o=e[0].toUpperCase()+e.slice(1),n=0;n<Ki.length;){if(t=Ki[n],s=t?t+o:e,s in r)return s;n++}}var xe;typeof window=="undefined"?xe={}:xe=window;var $i=Dt(Mn.style,"touchAction"),Zi=$i!==void 0;function Fn(){if(!Zi)return!1;var r={},e=xe.CSS&&xe.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(t){return r[t]=e?xe.CSS.supports("touch-action",t):!0}),r}var Qi="compute",Ji="auto",ri="manipulation",Ye="none",ht="pan-x",lt="pan-y",Mt=Fn(),Bn=/mobile|tablet|ip(ad|hone|od)|android/i,es="ontouchstart"in xe,An=Dt(xe,"PointerEvent")!==void 0,zn=es&&Bn.test(navigator.userAgent),ct="touch",Rn="pen",ai="mouse",Ln="kinect",Hn=25,ne=1,Ue=2,J=4,he=8,Nt=1,ut=2,ft=4,pt=8,it=16,we=ut|ft,Xe=pt|it,ts=we|Xe,is=["x","y"],Ft=["clientX","clientY"];function Ce(r,e,t){var s;if(!!r)if(r.forEach)r.forEach(e,t);else if(r.length!==void 0)for(s=0;s<r.length;)e.call(t,r[s],s,r),s++;else for(s in r)r.hasOwnProperty(s)&&e.call(t,r[s],s,r)}function Bt(r,e){return typeof r===Nn?r.apply(e&&e[0]||void 0,e):r}function Ge(r,e){return r.indexOf(e)>-1}function jn(r){if(Ge(r,Ye))return Ye;var e=Ge(r,ht),t=Ge(r,lt);return e&&t?Ye:e||t?e?ht:lt:Ge(r,ri)?ri:Ji}var ss=function(){function r(t,s){this.manager=t,this.set(s)}var e=r.prototype;return e.set=function(s){s===Qi&&(s=this.compute()),Zi&&this.manager.element.style&&Mt[s]&&(this.manager.element.style[$i]=s),this.actions=s.toLowerCase().trim()},e.update=function(){this.set(this.manager.options.touchAction)},eLine truncated
|
||||
(()=>{var Tn=Object.create;var Pt=Object.defineProperty,kn=Object.defineProperties,Sn=Object.getOwnPropertyDescriptor,On=Object.getOwnPropertyDescriptors,In=Object.getOwnPropertyNames,Ui=Object.getOwnPropertySymbols,Pn=Object.getPrototypeOf,Xi=Object.prototype.hasOwnProperty,Dn=Object.prototype.propertyIsEnumerable;var ii=(r,e,t)=>e in r?Pt(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,be=(r,e)=>{for(var t in e||(e={}))Xi.call(e,t)&&ii(r,t,e[t]);if(Ui)for(var t of Ui(e))Dn.call(e,t)&&ii(r,t,e[t]);return r},We=(r,e)=>kn(r,On(e)),Mn=r=>Pt(r,"__esModule",{value:!0});var Nn=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports);var Fn=(r,e,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of In(e))!Xi.call(r,s)&&s!=="default"&&Pt(r,s,{get:()=>e[s],enumerable:!(t=Sn(e,s))||t.enumerable});return r},Gi=r=>Fn(Mn(Pt(r!=null?Tn(Pn(r)):{},"default",r&&r.__esModule&&"default"in r?{get:()=>r.default,enumerable:!0}:{value:r,enumerable:!0})),r);var se=(r,e,t)=>(ii(r,typeof e!="symbol"?e+"":e,t),t);var Ki=(r,e,t)=>new Promise((s,o)=>{var n=h=>{try{d(t.next(h))}catch(l){o(l)}},a=h=>{try{d(t.throw(h))}catch(l){o(l)}},d=h=>h.done?s(h.value):Promise.resolve(h.value).then(n,a);d((t=t.apply(r,e)).next())});var oi=Nn((qa,si)=>{typeof si!="undefined"&&(si.exports=ce);function ce(r){if(r)return Bn(r)}function Bn(r){for(var e in ce.prototype)r[e]=ce.prototype[e];return r}ce.prototype.on=ce.prototype.addEventListener=function(r,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+r]=this._callbacks["$"+r]||[]).push(e),this};ce.prototype.once=function(r,e){function t(){this.off(r,t),e.apply(this,arguments)}return t.fn=e,this.on(r,t),this};ce.prototype.off=ce.prototype.removeListener=ce.prototype.removeAllListeners=ce.prototype.removeEventListener=function(r,e){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var t=this._callbacks["$"+r];if(!t)return this;if(arguments.length==1)return delete this._callbacks["$"+r],this;for(var s,o=0;o<t.length;o++)if(s=t[o],s===e||s.fn===e){t.splice(o,1);break}return t.length===0&&delete this._callbacks["$"+r],this};ce.prototype.emit=function(r){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),t=this._callbacks["$"+r],s=1;s<arguments.length;s++)e[s-1]=arguments[s];if(t){t=t.slice(0);for(var s=0,o=t.length;s<o;++s)t[s].apply(this,e)}return this};ce.prototype.listeners=function(r){return this._callbacks=this._callbacks||{},this._callbacks["$"+r]||[]};ce.prototype.hasListeners=function(r){return!!this.listeners(r).length}});var Ms=Gi(oi());function ve(){return ve=Object.assign||function(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(r[s]=t[s])}return r},ve.apply(this,arguments)}function ge(r,e){r.prototype=Object.create(e.prototype),r.prototype.constructor=r,r.__proto__=e}function Dt(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}var ni;typeof Object.assign!="function"?ni=function(e){if(e==null)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),s=1;s<arguments.length;s++){var o=arguments[s];if(o!=null)for(var n in o)o.hasOwnProperty(n)&&(t[n]=o[n])}return t}:ni=Object.assign;var Ve=ni,$i=["","webkit","Moz","MS","ms","o"],An=typeof document=="undefined"?{style:{}}:document.createElement("div"),zn="function",tt=Math.round,qe=Math.abs,ri=Date.now;function Mt(r,e){for(var t,s,o=e[0].toUpperCase()+e.slice(1),n=0;n<$i.length;){if(t=$i[n],s=t?t+o:e,s in r)return s;n++}}var Ce;typeof window=="undefined"?Ce={}:Ce=window;var Zi=Mt(An.style,"touchAction"),Qi=Zi!==void 0;function Rn(){if(!Qi)return!1;var r={},e=Ce.CSS&&Ce.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(t){return r[t]=e?Ce.CSS.supports("touch-action",t):!0}),r}var Ji="compute",es="auto",ai="manipulation",Ye="none",lt="pan-x",ct="pan-y",Nt=Rn(),Ln=/mobile|tablet|ip(ad|hone|od)|android/i,ts="ontouchstart"in Ce,Hn=Mt(Ce,"PointerEvent")!==void 0,jn=ts&&Ln.test(navigator.userAgent),ut="touch",Wn="pen",di="mouse",Vn="kinect",qn=25,ne=1,Ue=2,J=4,de=8,Ft=1,ft=2,pt=4,gt=8,it=16,_e=ft|pt,Xe=gt|it,is=_e|Xe,ss=["x","y"],Bt=["clientX","clientY"];function Te(r,e,t){var s;if(!!r)if(r.forEach)r.forEach(e,t);else if(r.length!==void 0)for(s=0;s<r.length;)e.call(t,r[s],s,r),s++;else for(s in r)r.hasOwnProperty(s)&&e.call(t,r[s],s,r)}function At(r,e){return typeof r===zn?r.apply(e&&e[0]||void 0,e):r}function Ge(r,e){return r.indexOf(e)>-1}function Yn(r){if(Ge(r,Ye))return Ye;var e=Ge(r,lt),t=Ge(r,ct);return e&&t?Ye:e||t?e?lt:ct:Ge(r,ai)?ai:es}var os=function(){function r(t,s){this.manager=t,this.set(s)}var e=r.prototype;return e.set=function(s){s===Ji&&(s=this.compute()),Qi&&this.manager.element.style&&Nt[s]&&(this.manager.element.style[Zi]=s),this.actions=s.toLowerCase().trim()},e.update=function(){this.set(this.manager.options.touchAction)},eLine truncated
|
||||
`+t+` AT
|
||||
`;return function(){var o=new Error("get-stack-trace"),n=o&&o.stack?o.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",a=window.console&&(window.console.warn||window.console.log);return a&&a.call(window.console,s,n),r.apply(this,arguments)}}var Ss=ks(function(r,e,t){for(var s=Object.keys(e),o=0;o<s.length;)(!t||t&&r[s[o]]===void 0)&&(r[s[o]]=e[s[o]]),o++;return r},"extend","Use `assign`."),gr=ks(function(r,e){return Ss(r,e,!0)},"merge","Use `assign`.");function mr(r,e,t){var s=e.prototype,o;o=r.prototype=Object.create(s),o.constructor=r,o._super=s,t&&Ve(o,t)}function Os(r,e){return function(){return r.apply(e,arguments)}}var Is=function(){var r=function(t,s){return s===void 0&&(s={}),new Ts(t,ve({recognizers:Es.concat()},s))};return r.VERSION="2.0.17-rc",r.DIRECTION_ALL=ts,r.DIRECTION_DOWN=it,r.DIRECTION_LEFT=ut,r.DIRECTION_RIGHT=ft,r.DIRECTION_UP=pt,r.DIRECTION_HORIZONTAL=we,r.DIRECTION_VERTICAL=Xe,r.DIRECTION_NONE=Nt,r.DIRECTION_DOWN=it,r.INPUT_START=ne,r.INPUT_MOVE=Ue,r.INPUT_END=J,r.INPUT_CANCEL=he,r.STATE_POSSIBLE=zt,r.STATE_BEGAN=ge,r.STATE_CHANGED=nt,r.STATE_ENDED=Be,r.STATE_RECOGNIZED=Te,r.STATE_CANCELLED=vt,r.STATE_FAILED=_e,r.Manager=Ts,r.Input=st,r.TouchAction=ss,r.TouchInput=ci,r.MouseInput=ui,r.PointerEventInput=cs,r.TouchMouseInput=ps,r.SingleTouchInput=fr,r.Recognizer=wt,r.AttrRecognizer=rt,r.Tap=fi,r.Pan=pi,r.Swipe=ys,r.Pinch=bs,r.Rotate=vs,r.Press=ws,r.on=mt,r.off=yt,r.each=Ce,r.merge=gr,r.extend=Ss,r.bindFn=Os,r.assign=Ve,r.inherit=mr,r.bindFn=Os,r.prefixed=Dt,r.toArray=bt,r.inArray=Ke,r.uniqueArray=li,r.splitStr=gt,r.boolOrFn=Bt,r.hasParent=di,r.addEventListeners=mt,r.removeEventListeners=yt,r.defaults=Ve({},_s,{preset:Es}),r}(),ja=Is.defaults,Ps=Is;var gi=Symbol("DELETE");function Ms(r,...e){return Ns({},r,...e)}function Ns(...r){let e=Lt(...r);return Bs(e),e}function Lt(...r){if(r.length<2)return r[0];if(r.length>2)return Lt(Ns(r[0],r[1]),...r.slice(2));let e=r[0],t=r[1];if(e instanceof Date&&t instanceof Date)return e.setTime(t.getTime()),e;for(let s of Reflect.ownKeys(t))Object.prototype.propertyIsEnumerable.call(t,s)&&(t[s]===gi?delete e[s]:e[s]!==null&&t[s]!==null&&typeof e[s]=="object"&&typeof t[s]=="object"&&!Array.isArray(e[s])&&!Array.isArray(t[s])?e[s]=Lt(e[s],t[s]):e[s]=Fs(t[s]));return e}function Fs(r){return Array.isArray(r)?r.map(e=>Fs(e)):typeof r=="object"&&r!==null?r instanceof Date?new Date(r.getTime()):Lt({},r):r}function Bs(r){for(let e of Object.keys(r))r[e]===gi?delete r[e]:typeof r[e]=="object"&&r[e]!==null&&Bs(r[e])}function _t(...r){return yr(r.length?r:[Date.now()])}function yr(r){let[e,t,s]=br(r),o=1,n=()=>{let a=2091639*e+o*23283064365386963e-26;return e=t,t=s,s=a-(o=a|0)};return n.uint32=()=>n()*4294967296,n.fract53=()=>n()+(n()*2097152|0)*11102230246251565e-32,n.algorithm="Alea",n.seed=r,n.version="0.9",n}function br(...r){let e=vr(),t=e(" "),s=e(" "),o=e(" ");for(let n=0;n<r.length;n++)t-=e(r[n]),t<0&&(t+=1),s-=e(r[n]),s<0&&(s+=1),o-=e(r[n]),o<0&&(o+=1);return[t,s,o]}function vr(){let r=4022871197;return function(e){let t=e.toString();for(let s=0;s<t.length;s++){r+=t.charCodeAt(s);let o=.02519603282416938*r;r=o>>>0,o-=r,o*=r,r=o>>>0,o-=r,r+=o*4294967296}return(r>>>0)*23283064365386963e-26}}function wr(){let r=()=>{};return{on:r,off:r,destroy:r,emit:r,get(){return{set:r}}}}var mi=typeof window!="undefined"?window.Hammer||Ps:function(){return wr()};function Ee(r){this._cleanupQueue=[],this.active=!1,this._dom={container:r,overlay:document.createElement("div")},this._dom.overlay.classList.add("vis-overlay"),this._dom.container.appendChild(this._dom.overlay),this._cleanupQueue.push(()=>{this._dom.overlay.parentNode.removeChild(this._dom.overlay)});let e=mi(this._dom.overlay);e.on("tap",this._onTapOverlay.bind(this)),this._cleanupQueue.push(()=>{e.destroy()}),["tap","doubletap","press","pinch","pan","panstart","panmove","panend"].forEach(s=>{e.on(s,o=>{o.srcEvent.stopPropagation()})}),document&&document.body&&(this._onClick=s=>{_r(s.target,r)||this.deactivate()},document.body.addEventListener("click",this._onClick),this._cleanupQueue.push(()=>{document.body.removeEventListener("click",this._onClick)})),this._escListener=s=>{("key"in s?s.key==="Escape":s.keyCode===27)&&this.deactivate()}}(0,Ds.default)(Ee.prototype);Ee.current=null;Ee.prototype.destroy=function(){this.deactivate();for(let r of this._cleanupQueue.splice(0).reverse())r()};Ee.prototype.activate=function(){Ee.current&&Ee.current.deactivate(),Ee.current=this,this.active=!0,this._dom.overlay.style.display="none",this._dom.container.classList.add("vis-active"),this.emit("change"),this.emit("activate"),document.body.addEventListener("keydown",this._escListener)};Ee.prototype.deactivate=function(){this.active=!1,this._dom.overlay.style.display="block",this._dom.container.classList.remove("vis-active"),document.body.removeEventListener("keydown",this._escListener),this.emit("change"),this.emit("deactivate")};Ee.proto
Line truncated
|
||||
`;return function(){var o=new Error("get-stack-trace"),n=o&&o.stack?o.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",a=window.console&&(window.console.warn||window.console.log);return a&&a.call(window.console,s,n),r.apply(this,arguments)}}var Os=Ss(function(r,e,t){for(var s=Object.keys(e),o=0;o<s.length;)(!t||t&&r[s[o]]===void 0)&&(r[s[o]]=e[s[o]]),o++;return r},"extend","Use `assign`."),vr=Ss(function(r,e){return Os(r,e,!0)},"merge","Use `assign`.");function wr(r,e,t){var s=e.prototype,o;o=r.prototype=Object.create(s),o.constructor=r,o._super=s,t&&Ve(o,t)}function Is(r,e){return function(){return r.apply(e,arguments)}}var Ps=function(){var r=function(t,s){return s===void 0&&(s={}),new ks(t,ve({recognizers:xs.concat()},s))};return r.VERSION="2.0.17-rc",r.DIRECTION_ALL=is,r.DIRECTION_DOWN=it,r.DIRECTION_LEFT=ft,r.DIRECTION_RIGHT=pt,r.DIRECTION_UP=gt,r.DIRECTION_HORIZONTAL=_e,r.DIRECTION_VERTICAL=Xe,r.DIRECTION_NONE=Ft,r.DIRECTION_DOWN=it,r.INPUT_START=ne,r.INPUT_MOVE=Ue,r.INPUT_END=J,r.INPUT_CANCEL=de,r.STATE_POSSIBLE=Rt,r.STATE_BEGAN=me,r.STATE_CHANGED=nt,r.STATE_ENDED=Be,r.STATE_RECOGNIZED=ke,r.STATE_CANCELLED=wt,r.STATE_FAILED=Ee,r.Manager=ks,r.Input=st,r.TouchAction=os,r.TouchInput=ui,r.MouseInput=fi,r.PointerEventInput=us,r.TouchMouseInput=gs,r.SingleTouchInput=yr,r.Recognizer=_t,r.AttrRecognizer=rt,r.Tap=pi,r.Pan=gi,r.Swipe=bs,r.Pinch=vs,r.Rotate=ws,r.Press=_s,r.on=yt,r.off=bt,r.each=Te,r.merge=vr,r.extend=Os,r.bindFn=Is,r.assign=Ve,r.inherit=wr,r.bindFn=Is,r.prefixed=Mt,r.toArray=vt,r.inArray=Ke,r.uniqueArray=ci,r.splitStr=mt,r.boolOrFn=At,r.hasParent=hi,r.addEventListeners=yt,r.removeEventListeners=bt,r.defaults=Ve({},Es,{preset:xs}),r}(),Ya=Ps.defaults,Ds=Ps;var mi=Symbol("DELETE");function Ns(r,...e){return Fs({},r,...e)}function Fs(...r){let e=Ht(...r);return As(e),e}function Ht(...r){if(r.length<2)return r[0];if(r.length>2)return Ht(Fs(r[0],r[1]),...r.slice(2));let e=r[0],t=r[1];if(e instanceof Date&&t instanceof Date)return e.setTime(t.getTime()),e;for(let s of Reflect.ownKeys(t))Object.prototype.propertyIsEnumerable.call(t,s)&&(t[s]===mi?delete e[s]:e[s]!==null&&t[s]!==null&&typeof e[s]=="object"&&typeof t[s]=="object"&&!Array.isArray(e[s])&&!Array.isArray(t[s])?e[s]=Ht(e[s],t[s]):e[s]=Bs(t[s]));return e}function Bs(r){return Array.isArray(r)?r.map(e=>Bs(e)):typeof r=="object"&&r!==null?r instanceof Date?new Date(r.getTime()):Ht({},r):r}function As(r){for(let e of Object.keys(r))r[e]===mi?delete r[e]:typeof r[e]=="object"&&r[e]!==null&&As(r[e])}function Et(...r){return _r(r.length?r:[Date.now()])}function _r(r){let[e,t,s]=Er(r),o=1,n=()=>{let a=2091639*e+o*23283064365386963e-26;return e=t,t=s,s=a-(o=a|0)};return n.uint32=()=>n()*4294967296,n.fract53=()=>n()+(n()*2097152|0)*11102230246251565e-32,n.algorithm="Alea",n.seed=r,n.version="0.9",n}function Er(...r){let e=xr(),t=e(" "),s=e(" "),o=e(" ");for(let n=0;n<r.length;n++)t-=e(r[n]),t<0&&(t+=1),s-=e(r[n]),s<0&&(s+=1),o-=e(r[n]),o<0&&(o+=1);return[t,s,o]}function xr(){let r=4022871197;return function(e){let t=e.toString();for(let s=0;s<t.length;s++){r+=t.charCodeAt(s);let o=.02519603282416938*r;r=o>>>0,o-=r,o*=r,r=o>>>0,o-=r,r+=o*4294967296}return(r>>>0)*23283064365386963e-26}}function Cr(){let r=()=>{};return{on:r,off:r,destroy:r,emit:r,get(){return{set:r}}}}var yi=typeof window!="undefined"?window.Hammer||Ds:function(){return Cr()};function xe(r){this._cleanupQueue=[],this.active=!1,this._dom={container:r,overlay:document.createElement("div")},this._dom.overlay.classList.add("vis-overlay"),this._dom.container.appendChild(this._dom.overlay),this._cleanupQueue.push(()=>{this._dom.overlay.parentNode.removeChild(this._dom.overlay)});let e=yi(this._dom.overlay);e.on("tap",this._onTapOverlay.bind(this)),this._cleanupQueue.push(()=>{e.destroy()}),["tap","doubletap","press","pinch","pan","panstart","panmove","panend"].forEach(s=>{e.on(s,o=>{o.srcEvent.stopPropagation()})}),document&&document.body&&(this._onClick=s=>{Tr(s.target,r)||this.deactivate()},document.body.addEventListener("click",this._onClick),this._cleanupQueue.push(()=>{document.body.removeEventListener("click",this._onClick)})),this._escListener=s=>{("key"in s?s.key==="Escape":s.keyCode===27)&&this.deactivate()}}(0,Ms.default)(xe.prototype);xe.current=null;xe.prototype.destroy=function(){this.deactivate();for(let r of this._cleanupQueue.splice(0).reverse())r()};xe.prototype.activate=function(){xe.current&&xe.current.deactivate(),xe.current=this,this.active=!0,this._dom.overlay.style.display="none",this._dom.container.classList.add("vis-active"),this.emit("change"),this.emit("activate"),document.body.addEventListener("keydown",this._escListener)};xe.prototype.deactivate=function(){this.active=!1,this._dom.overlay.style.display="block",this._dom.container.classList.remove("vis-active"),document.body.removeEventListener("keydown",this._escListener),this.emit("change"),this.emit("deactivate")};xe.proto
Line truncated
|
||||
|
||||
`:n.distance<=d&&o.distance>n.distance?h=" in "+G.printLocation(o.path,e,"")+"Perhaps it was misplaced? Matching option found at: "+G.printLocation(n.path,n.closestMatch,""):o.distance<=a?h='. Did you mean "'+o.closestMatch+'"?'+G.printLocation(o.path,e):h=". Did you mean one of these: "+G.print(Object.keys(t))+G.printLocation(s,e),console.error('%cUnknown option detected: "'+e+'"'+h,wi),Ct=!0}static findInOptions(e,t,s,o=!1){let n=1e9,a="",d=[],h=e.toLowerCase(),l;for(let c in t){let u;if(t[c].__type__!==void 0&&o===!0){let f=G.findInOptions(e,t[c],Ht(s,c));n>f.distance&&(a=f.closestMatch,d=f.path,n=f.distance,l=f.indexMatch)}else c.toLowerCase().indexOf(h)!==-1&&(l=c),u=G.levenshteinDistance(e,c),n>u&&(a=c,d=kr(s),n=u)}return{closestMatch:a,path:d,distance:n,indexMatch:l}}static printLocation(e,t,s=`Problem value found at:
|
||||
`:n.distance<=d&&o.distance>n.distance?h=" in "+G.printLocation(o.path,e,"")+"Perhaps it was misplaced? Matching option found at: "+G.printLocation(n.path,n.closestMatch,""):o.distance<=a?h='. Did you mean "'+o.closestMatch+'"?'+G.printLocation(o.path,e):h=". Did you mean one of these: "+G.print(Object.keys(t))+G.printLocation(s,e),console.error('%cUnknown option detected: "'+e+'"'+h,_i),Tt=!0}static findInOptions(e,t,s,o=!1){let n=1e9,a="",d=[],h=e.toLowerCase(),l;for(let c in t){let u;if(t[c].__type__!==void 0&&o===!0){let f=G.findInOptions(e,t[c],jt(s,c));n>f.distance&&(a=f.closestMatch,d=f.path,n=f.distance,l=f.indexMatch)}else c.toLowerCase().indexOf(h)!==-1&&(l=c),u=G.levenshteinDistance(e,c),n>u&&(a=c,d=Pr(s),n=u)}return{closestMatch:a,path:d,distance:n,indexMatch:l}}static printLocation(e,t,s=`Problem value found at:
|
||||
`){let o=`
|
||||
|
||||
`+s+`options = {
|
||||
@@ -11,16 +11,16 @@
|
||||
`;for(let n=0;n<e.length+1;n++){for(let a=0;a<e.length-n;a++)o+=" ";o+=`}
|
||||
`}return o+`
|
||||
|
||||
`}static print(e){return JSON.stringify(e).replace(/(")|(\[)|(\])|(,"__type__")/g,"").replace(/(,)/g,", ")}static levenshteinDistance(e,t){if(e.length===0)return t.length;if(t.length===0)return e.length;let s=[],o;for(o=0;o<=t.length;o++)s[o]=[o];let n;for(n=0;n<=e.length;n++)s[0][n]=n;for(o=1;o<=t.length;o++)for(n=1;n<=e.length;n++)t.charAt(o-1)==e.charAt(n-1)?s[o][n]=s[o-1][n-1]:s[o][n]=Math.min(s[o-1][n-1]+1,Math.min(s[o][n-1]+1,s[o-1][n]+1));return s[t.length][e.length]}},qs=Ee;var Ys=Dr,Qe=mi,Us=Mr,_i=wi,Xs=Nr;var qt,Fr=new Uint8Array(16);function Ei(){if(!qt&&(qt=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!qt))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return qt(Fr)}var Gs=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function Br(r){return typeof r=="string"&&Gs.test(r)}var Ks=Br;var te=[];for(Yt=0;Yt<256;++Yt)te.push((Yt+256).toString(16).substr(1));var Yt;function Ar(r){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,t=(te[r[e+0]]+te[r[e+1]]+te[r[e+2]]+te[r[e+3]]+"-"+te[r[e+4]]+te[r[e+5]]+"-"+te[r[e+6]]+te[r[e+7]]+"-"+te[r[e+8]]+te[r[e+9]]+"-"+te[r[e+10]]+te[r[e+11]]+te[r[e+12]]+te[r[e+13]]+te[r[e+14]]+te[r[e+15]]).toLowerCase();if(!Ks(t))throw TypeError("Stringified UUID is invalid");return t}var $s=Ar;function zr(r,e,t){r=r||{};var s=r.random||(r.rng||Ei)();if(s[6]=s[6]&15|64,s[8]=s[8]&63|128,e){t=t||0;for(var o=0;o<16;++o)e[t+o]=s[o];return e}return $s(s)}var Pe=zr;function Zs(r){return typeof r=="string"||typeof r=="number"}var Ut=class{constructor(e){se(this,"delay");se(this,"max");se(this,"_queue",[]);se(this,"_timeout",null);se(this,"_extended",null);this.delay=null,this.max=1/0,this.setOptions(e)}setOptions(e){e&&typeof e.delay!="undefined"&&(this.delay=e.delay),e&&typeof e.max!="undefined"&&(this.max=e.max),this._flushIfNeeded()}static extend(e,t){let s=new Ut(t);if(e.flush!==void 0)throw new Error("Target object already has a property flush");e.flush=()=>{s.flush()};let o=[{name:"flush",original:void 0}];if(t&&t.replace)for(let n=0;n<t.replace.length;n++){let a=t.replace[n];o.push({name:a,original:e[a]}),s.replace(e,a)}return s._extended={object:e,methods:o},s}destroy(){if(this.flush(),this._extended){let e=this._extended.object,t=this._extended.methods;for(let s=0;s<t.length;s++){let o=t[s];o.original?e[o.name]=o.original:delete e[o.name]}this._extended=null}}replace(e,t){let s=this,o=e[t];if(!o)throw new Error("Method "+t+" undefined");e[t]=function(...n){s.queue({args:n,fn:o,context:this})}}queue(e){typeof e=="function"?this._queue.push({fn:e}):this._queue.push(e),this._flushIfNeeded()}_flushIfNeeded(){this._queue.length>this.max&&this.flush(),this._timeout!=null&&(clearTimeout(this._timeout),this._timeout=null),this.queue.length>0&&typeof this.delay=="number"&&(this._timeout=setTimeout(()=>{this.flush()},this.delay))}flush(){this._queue.splice(0).forEach(e=>{e.fn.apply(e.context||e.fn,e.args||[])})}},Tt=class{constructor(){se(this,"_subscribers",{"*":[],add:[],remove:[],update:[]});se(this,"subscribe",Tt.prototype.on);se(this,"unsubscribe",Tt.prototype.off)}_trigger(e,t,s){if(e==="*")throw new Error("Cannot trigger event *");[...this._subscribers[e],...this._subscribers["*"]].forEach(o=>{o(e,t,s!=null?s:null)})}on(e,t){typeof t=="function"&&this._subscribers[e].push(t)}off(e,t){this._subscribers[e]=this._subscribers[e].filter(s=>s!==t)}},Ae=class{constructor(e){se(this,"_pairs");this._pairs=e}*[Symbol.iterator](){for(let[e,t]of this._pairs)yield[e,t]}*entries(){for(let[e,t]of this._pairs)yield[e,t]}*keys(){for(let[e]of this._pairs)yield e}*values(){for(let[,e]of this._pairs)yield e}toIdArray(){return[...this._pairs].map(e=>e[0])}toItemArray(){return[...this._pairs].map(e=>e[1])}toEntryArray(){return[...this._pairs]}toObjectMap(){let e=Object.create(null);for(let[t,s]of this._pairs)e[t]=s;return e}toMap(){return new Map(this._pairs)}toIdSet(){return new Set(this.toIdArray())}toItemSet(){return new Set(this.toItemArray())}cache(){return new Ae([...this._pairs])}distinct(e){let t=new Set;for(let[s,o]of this._pairs)t.add(e(o,s));return t}filter(e){let t=this._pairs;return new Ae({*[Symbol.iterator](){for(let[s,o]of t)e(o,s)&&(yield[s,o])}})}forEach(e){for(let[t,s]of this._pairs)e(s,t)}map(e){let t=this._pairs;return new Ae({*[Symbol.iterator](){for(let[s,o]of t)yield[s,e(o,s)]}})}max(e){let t=this._pairs[Symbol.iterator](),s=t.next();if(s.done)return null;let o=s.value[1],n=e(s.value[1],s.value[0]);for(;!(s=t.next()).done;){let[a,d]=s.value,h=e(d,a);h>n&&(n=h,o=d)}return o}min(e){let t=this._pairs[Symbol.iterator](),s=t.next();if(s.done)return null;let o=s.value[1],n=e(s.value[1],s.value[0]);for(;!(s=t.next()).done;){let[a,d]=s.value,h=e(d,a);h<n&&(n=h,o=d)}return o
Line truncated
|
||||
`}static print(e){return JSON.stringify(e).replace(/(")|(\[)|(\])|(,"__type__")/g,"").replace(/(,)/g,", ")}static levenshteinDistance(e,t){if(e.length===0)return t.length;if(t.length===0)return e.length;let s=[],o;for(o=0;o<=t.length;o++)s[o]=[o];let n;for(n=0;n<=e.length;n++)s[0][n]=n;for(o=1;o<=t.length;o++)for(n=1;n<=e.length;n++)t.charAt(o-1)==e.charAt(n-1)?s[o][n]=s[o-1][n-1]:s[o][n]=Math.min(s[o-1][n-1]+1,Math.min(s[o][n-1]+1,s[o-1][n]+1));return s[t.length][e.length]}},Ys=xe;var Us=Br,Qe=yi,Xs=Ar,Ei=_i,Gs=zr;var Yt,Rr=new Uint8Array(16);function xi(){if(!Yt&&(Yt=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!Yt))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Yt(Rr)}var Ks=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function Lr(r){return typeof r=="string"&&Ks.test(r)}var $s=Lr;var te=[];for(Ut=0;Ut<256;++Ut)te.push((Ut+256).toString(16).substr(1));var Ut;function Hr(r){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,t=(te[r[e+0]]+te[r[e+1]]+te[r[e+2]]+te[r[e+3]]+"-"+te[r[e+4]]+te[r[e+5]]+"-"+te[r[e+6]]+te[r[e+7]]+"-"+te[r[e+8]]+te[r[e+9]]+"-"+te[r[e+10]]+te[r[e+11]]+te[r[e+12]]+te[r[e+13]]+te[r[e+14]]+te[r[e+15]]).toLowerCase();if(!$s(t))throw TypeError("Stringified UUID is invalid");return t}var Zs=Hr;function jr(r,e,t){r=r||{};var s=r.random||(r.rng||xi)();if(s[6]=s[6]&15|64,s[8]=s[8]&63|128,e){t=t||0;for(var o=0;o<16;++o)e[t+o]=s[o];return e}return Zs(s)}var De=jr;function Qs(r){return typeof r=="string"||typeof r=="number"}var Xt=class{constructor(e){se(this,"delay");se(this,"max");se(this,"_queue",[]);se(this,"_timeout",null);se(this,"_extended",null);this.delay=null,this.max=1/0,this.setOptions(e)}setOptions(e){e&&typeof e.delay!="undefined"&&(this.delay=e.delay),e&&typeof e.max!="undefined"&&(this.max=e.max),this._flushIfNeeded()}static extend(e,t){let s=new Xt(t);if(e.flush!==void 0)throw new Error("Target object already has a property flush");e.flush=()=>{s.flush()};let o=[{name:"flush",original:void 0}];if(t&&t.replace)for(let n=0;n<t.replace.length;n++){let a=t.replace[n];o.push({name:a,original:e[a]}),s.replace(e,a)}return s._extended={object:e,methods:o},s}destroy(){if(this.flush(),this._extended){let e=this._extended.object,t=this._extended.methods;for(let s=0;s<t.length;s++){let o=t[s];o.original?e[o.name]=o.original:delete e[o.name]}this._extended=null}}replace(e,t){let s=this,o=e[t];if(!o)throw new Error("Method "+t+" undefined");e[t]=function(...n){s.queue({args:n,fn:o,context:this})}}queue(e){typeof e=="function"?this._queue.push({fn:e}):this._queue.push(e),this._flushIfNeeded()}_flushIfNeeded(){this._queue.length>this.max&&this.flush(),this._timeout!=null&&(clearTimeout(this._timeout),this._timeout=null),this.queue.length>0&&typeof this.delay=="number"&&(this._timeout=setTimeout(()=>{this.flush()},this.delay))}flush(){this._queue.splice(0).forEach(e=>{e.fn.apply(e.context||e.fn,e.args||[])})}},kt=class{constructor(){se(this,"_subscribers",{"*":[],add:[],remove:[],update:[]});se(this,"subscribe",kt.prototype.on);se(this,"unsubscribe",kt.prototype.off)}_trigger(e,t,s){if(e==="*")throw new Error("Cannot trigger event *");[...this._subscribers[e],...this._subscribers["*"]].forEach(o=>{o(e,t,s!=null?s:null)})}on(e,t){typeof t=="function"&&this._subscribers[e].push(t)}off(e,t){this._subscribers[e]=this._subscribers[e].filter(s=>s!==t)}},Ae=class{constructor(e){se(this,"_pairs");this._pairs=e}*[Symbol.iterator](){for(let[e,t]of this._pairs)yield[e,t]}*entries(){for(let[e,t]of this._pairs)yield[e,t]}*keys(){for(let[e]of this._pairs)yield e}*values(){for(let[,e]of this._pairs)yield e}toIdArray(){return[...this._pairs].map(e=>e[0])}toItemArray(){return[...this._pairs].map(e=>e[1])}toEntryArray(){return[...this._pairs]}toObjectMap(){let e=Object.create(null);for(let[t,s]of this._pairs)e[t]=s;return e}toMap(){return new Map(this._pairs)}toIdSet(){return new Set(this.toIdArray())}toItemSet(){return new Set(this.toItemArray())}cache(){return new Ae([...this._pairs])}distinct(e){let t=new Set;for(let[s,o]of this._pairs)t.add(e(o,s));return t}filter(e){let t=this._pairs;return new Ae({*[Symbol.iterator](){for(let[s,o]of t)e(o,s)&&(yield[s,o])}})}forEach(e){for(let[t,s]of this._pairs)e(s,t)}map(e){let t=this._pairs;return new Ae({*[Symbol.iterator](){for(let[s,o]of t)yield[s,e(o,s)]}})}max(e){let t=this._pairs[Symbol.iterator](),s=t.next();if(s.done)return null;let o=s.value[1],n=e(s.value[1],s.value[0]);for(;!(s=t.next()).done;){let[a,d]=s.value,h=e(d,a);h>n&&(n=h,o=d)}return o}min(e){let t=this._pairs[Symbol.iterator](),s=t.next();if(s.done)return null;let o=s.value[1],n=e(s.value[1],s.value[0]);for(;!(s=t.next()).done;){let[a,d]=s.value,h=e(d,a);h<n&&(n=h,o=d)}return o
Line truncated
|
||||
`||B==="\r";)ee();do{var r=!1;if(B==="#"){for(var e=at-1;ze.charAt(e)===" "||ze.charAt(e)===" ";)e--;if(ze.charAt(e)===`
|
||||
`||ze.charAt(e)===""){for(;B!=""&&B!=`
|
||||
`;)ee();r=!0}}if(B==="/"&&dt()==="/"){for(;B!=""&&B!=`
|
||||
`;)ee();r=!0}if(B==="/"&&dt()==="*"){for(;B!="";)if(B==="*"&&dt()==="/"){ee(),ee();break}else ee();r=!0}for(;B===" "||B===" "||B===`
|
||||
`||B==="\r";)ee()}while(r);if(B===""){le=re.DELIMITER;return}var t=B+dt();if(oo[t]){le=re.DELIMITER,D=t,ee(),ee();return}if(oo[B]){le=re.DELIMITER,D=B,ee();return}if(no(B)||B==="-"){for(D+=B,ee();no(B);)D+=B,ee();D==="false"?D=!1:D==="true"?D=!0:isNaN(Number(D))||(D=Number(D)),le=re.IDENTIFIER;return}if(B==='"'){for(ee();B!=""&&(B!='"'||B==='"'&&dt()==='"');)B==='"'?(D+=B,ee()):B==="\\"&&dt()==="n"?(D+=`
|
||||
`,ee()):D+=B,ee();if(B!='"')throw ae('End of string " expected');ee(),le=re.IDENTIFIER;return}for(le=re.UNKNOWN;B!="";)D+=B,ee();throw new SyntaxError('Syntax error in part "'+uo(D,30)+'"')}function Zr(){var r={};if(Gr(),q(),D==="strict"&&(r.strict=!0,q()),(D==="graph"||D==="digraph")&&(r.type=D,q()),le===re.IDENTIFIER&&(r.id=D,q()),D!="{")throw ae("Angle bracket { expected");if(q(),ho(r),D!="}")throw ae("Angle bracket } expected");if(q(),D!=="")throw ae("End of file expected");return q(),delete r.node,delete r.edge,delete r.graph,r}function ho(r){for(;D!==""&&D!="}";)Qr(r),D===";"&&q()}function Qr(r){var e=lo(r);if(e){co(r,e);return}var t=Jr(r);if(!t){if(le!=re.IDENTIFIER)throw ae("Identifier expected");var s=D;if(q(),D==="="){if(q(),le!=re.IDENTIFIER)throw ae("Identifier expected");r[s]=D,q()}else ea(r,s)}}function lo(r){var e=null;if(D==="subgraph"&&(e={},e.type="subgraph",q(),le===re.IDENTIFIER&&(e.id=D,q())),D==="{"){if(q(),e||(e={}),e.parent=r,e.node=r.node,e.edge=r.edge,e.graph=r.graph,ho(e),D!="}")throw ae("Angle bracket } expected");q(),delete e.node,delete e.edge,delete e.graph,delete e.parent,r.subgraphs||(r.subgraphs=[]),r.subgraphs.push(e)}return e}function Jr(r){return D==="node"?(q(),r.node=kt(),"node"):D==="edge"?(q(),r.edge=kt(),"edge"):D==="graph"?(q(),r.graph=kt(),"graph"):null}function ea(r,e){var t={id:e},s=kt();s&&(t.attr=s),ro(r,t),co(r,e)}function co(r,e){for(;D==="->"||D==="--";){var t,s=D;q();var o=lo(r);if(o)t=o;else{if(le!=re.IDENTIFIER)throw ae("Identifier or subgraph expected");t=D,ro(r,{id:t}),q()}var n=kt(),a=ao(r,e,t,s,n);$r(r,a),e=t}}function kt(){for(var r,e=null,t={dashed:!0,solid:!1,dotted:[1,5]},s={dot:"circle",box:"box",crow:"crow",curve:"curve",icurve:"inv_curve",normal:"triangle",inv:"inv_triangle",diamond:"diamond",tee:"bar",vee:"vee"},o=new Array,n=new Array;D==="[";){for(q(),e={};D!==""&&D!="]";){if(le!=re.IDENTIFIER)throw ae("Attribute name expected");var a=D;if(q(),D!="=")throw ae("Equal sign = expected");if(q(),le!=re.IDENTIFIER)throw ae("Attribute value expected");var d=D;a==="style"&&(d=t[d]);var h;a==="arrowhead"&&(h=s[d],a="arrows",d={to:{enabled:!0,type:h}}),a==="arrowtail"&&(h=s[d],a="arrows",d={from:{enabled:!0,type:h}}),o.push({attr:e,name:a,value:d}),n.push(a),q(),D==","&&q()}if(D!="]")throw ae("Bracket ] expected");q()}if(n.includes("dir")){var l={};for(l.arrows={},r=0;r<o.length;r++)if(o[r].name==="arrows")if(o[r].value.to!=null)l.arrows.to=r;else if(o[r].value.from!=null)l.arrows.from=r;else throw ae("Invalid value of arrows");else o[r].name==="dir"&&(l.dir=r);var c=o[l.dir].value;if(!n.includes("arrows"))if(c==="both")o.push({attr:o[l.dir].attr,name:"arrows",value:{to:{enabled:!0}}}),l.arrows.to=o.length-1,o.push({attr:o[l.dir].attr,name:"arrows",value:{from:{enabled:!0}}}),l.arrows.from=o.length-1;else if(c==="forward")o.push({attr:o[l.dir].attr,name:"arrows",value:{to:{enabled:!0}}}),l.arrows.to=o.length-1;else if(c==="back")o.push({attr:o[l.dir].attr,name:"arrows",value:{from:{enabled:!0}}}),l.arrows.from=o.length-1;else if(c==="none")o.push({attr:o[l.dir].attr,name:"arrows",value:""}),l.arrows.to=o.length-1;else throw ae('Invalid dir type "'+c+'"');var u,f;if(c==="both")l.arrows.to&&l.arrows.from?(f=o[l.arrows.to].value.to.type,u=o[l.arrows.from].value.from.type,o[l.arrows.to]={attr:o[l.arrows.to].attr,name:o[l.arrows.to].name,value:{to:{enabled:!0,type:f},from:{enabled:!0,type:u}}},o.splice(l.arrows.from,1)):l.arrows.to?(f=o[l.arrows.to].value.to.type,u="arrow",o[l.arrows.to]={attr:o[l.arrows.to].attr,name:o[l.arrows.to].name,value:{to:{enabled:!0,type:f},from:{enabled:!0,type:u}}}):l.arrows.from&&(f="arrow",u=o[l.arrows.from].value.from.type,o[l.arrows.from]={attr:o[l.arrows.from].attr,name:o[l.arrows.from].name,value:{to:{enabled:!0,type:f},from:{enabled:!0,type:u}}});else if(c==="back")l.arrows.to&&l.arrows.from?(f="",u=o[l.arrows.from].value.from.type,o[l.arrows.from]={attr:o[l.arrows.from].attr,name:o[l.arrows.from].name,value:{to:{enabled:!0,type:f},from:{enabled:!0,type:u}}}):l.arrows.to?(f="",u="arrow",l.arrows.from=l.arrows.to,o[l.arrows.from]={attr:o[l.arrows.from].attr,name:o[l.arrows.from].name,value:{to:{enabled:!0,type:f},from:{enabled:!0,type:u}}}):l.arrows.from&&(f="",u=o[l.arrows.from].value.from.type,o[l.arrows.to]={attr:o[l.arrows.from].attr,name:o[l.arrows.from].name,value:{to:{enabled:!0,type:f},from:{enabled:!0,type:u}}}),o[l.arrows.from]={attr:o[l.arrows.from].attr,name:o[l.arrows.from].name,value:{from:{enabled:!0,type:o[l.arrows.from].value.from.type}}};else if(c==="none"){var p;l.arrows.to?p=l.arrows.to:p=l.arrows.from,o[p]={attr:o[p].attr,name:o[p].name,value:""}}else if(c==="forward")l.arrows.to&&l.arrows.from?(f=o[l.arrows.to].value.to.type,u="",o[l.arrows.to]={attr:o[l.arrows.to].attr,name:o[l.arrows.to].name,value:{to:{enabled:!0,type:f},from:{enabled:!0,type:u}}}):l.arrows.to?(f=o[l.arrows.to].value.to.type,u="",o[l.arrows.to]={attr:o[l.arrows.to].attr,name:o[l.arrows.to].name,value:{to:{enabled:!0,type:f},from
Line truncated
|
||||
`||B==="\r";)ee()}while(r);if(B===""){he=re.DELIMITER;return}var t=B+dt();if(no[t]){he=re.DELIMITER,D=t,ee(),ee();return}if(no[B]){he=re.DELIMITER,D=B,ee();return}if(ro(B)||B==="-"){for(D+=B,ee();ro(B);)D+=B,ee();D==="false"?D=!1:D==="true"?D=!0:isNaN(Number(D))||(D=Number(D)),he=re.IDENTIFIER;return}if(B==='"'){for(ee();B!=""&&(B!='"'||B==='"'&&dt()==='"');)B==='"'?(D+=B,ee()):B==="\\"&&dt()==="n"?(D+=`
|
||||
`,ee()):D+=B,ee();if(B!='"')throw ae('End of string " expected');ee(),he=re.IDENTIFIER;return}for(he=re.UNKNOWN;B!="";)D+=B,ee();throw new SyntaxError('Syntax error in part "'+fo(D,30)+'"')}function ta(){var r={};if(Qr(),q(),D==="strict"&&(r.strict=!0,q()),(D==="graph"||D==="digraph")&&(r.type=D,q()),he===re.IDENTIFIER&&(r.id=D,q()),D!="{")throw ae("Angle bracket { expected");if(q(),lo(r),D!="}")throw ae("Angle bracket } expected");if(q(),D!=="")throw ae("End of file expected");return q(),delete r.node,delete r.edge,delete r.graph,r}function lo(r){for(;D!==""&&D!="}";)ia(r),D===";"&&q()}function ia(r){var e=co(r);if(e){uo(r,e);return}var t=sa(r);if(!t){if(he!=re.IDENTIFIER)throw ae("Identifier expected");var s=D;if(q(),D==="="){if(q(),he!=re.IDENTIFIER)throw ae("Identifier expected");r[s]=D,q()}else oa(r,s)}}function co(r){var e=null;if(D==="subgraph"&&(e={},e.type="subgraph",q(),he===re.IDENTIFIER&&(e.id=D,q())),D==="{"){if(q(),e||(e={}),e.parent=r,e.node=r.node,e.edge=r.edge,e.graph=r.graph,lo(e),D!="}")throw ae("Angle bracket } expected");q(),delete e.node,delete e.edge,delete e.graph,delete e.parent,r.subgraphs||(r.subgraphs=[]),r.subgraphs.push(e)}return e}function sa(r){return D==="node"?(q(),r.node=St(),"node"):D==="edge"?(q(),r.edge=St(),"edge"):D==="graph"?(q(),r.graph=St(),"graph"):null}function oa(r,e){var t={id:e},s=St();s&&(t.attr=s),ao(r,t),uo(r,e)}function uo(r,e){for(;D==="->"||D==="--";){var t,s=D;q();var o=co(r);if(o)t=o;else{if(he!=re.IDENTIFIER)throw ae("Identifier or subgraph expected");t=D,ao(r,{id:t}),q()}var n=St(),a=ho(r,e,t,s,n);ea(r,a),e=t}}function St(){for(var r,e=null,t={dashed:!0,solid:!1,dotted:[1,5]},s={dot:"circle",box:"box",crow:"crow",curve:"curve",icurve:"inv_curve",normal:"triangle",inv:"inv_triangle",diamond:"diamond",tee:"bar",vee:"vee"},o=new Array,n=new Array;D==="[";){for(q(),e={};D!==""&&D!="]";){if(he!=re.IDENTIFIER)throw ae("Attribute name expected");var a=D;if(q(),D!="=")throw ae("Equal sign = expected");if(q(),he!=re.IDENTIFIER)throw ae("Attribute value expected");var d=D;a==="style"&&(d=t[d]);var h;a==="arrowhead"&&(h=s[d],a="arrows",d={to:{enabled:!0,type:h}}),a==="arrowtail"&&(h=s[d],a="arrows",d={from:{enabled:!0,type:h}}),o.push({attr:e,name:a,value:d}),n.push(a),q(),D==","&&q()}if(D!="]")throw ae("Bracket ] expected");q()}if(n.includes("dir")){var l={};for(l.arrows={},r=0;r<o.length;r++)if(o[r].name==="arrows")if(o[r].value.to!=null)l.arrows.to=r;else if(o[r].value.from!=null)l.arrows.from=r;else throw ae("Invalid value of arrows");else o[r].name==="dir"&&(l.dir=r);var c=o[l.dir].value;if(!n.includes("arrows"))if(c==="both")o.push({attr:o[l.dir].attr,name:"arrows",value:{to:{enabled:!0}}}),l.arrows.to=o.length-1,o.push({attr:o[l.dir].attr,name:"arrows",value:{from:{enabled:!0}}}),l.arrows.from=o.length-1;else if(c==="forward")o.push({attr:o[l.dir].attr,name:"arrows",value:{to:{enabled:!0}}}),l.arrows.to=o.length-1;else if(c==="back")o.push({attr:o[l.dir].attr,name:"arrows",value:{from:{enabled:!0}}}),l.arrows.from=o.length-1;else if(c==="none")o.push({attr:o[l.dir].attr,name:"arrows",value:""}),l.arrows.to=o.length-1;else throw ae('Invalid dir type "'+c+'"');var u,f;if(c==="both")l.arrows.to&&l.arrows.from?(f=o[l.arrows.to].value.to.type,u=o[l.arrows.from].value.from.type,o[l.arrows.to]={attr:o[l.arrows.to].attr,name:o[l.arrows.to].name,value:{to:{enabled:!0,type:f},from:{enabled:!0,type:u}}},o.splice(l.arrows.from,1)):l.arrows.to?(f=o[l.arrows.to].value.to.type,u="arrow",o[l.arrows.to]={attr:o[l.arrows.to].attr,name:o[l.arrows.to].name,value:{to:{enabled:!0,type:f},from:{enabled:!0,type:u}}}):l.arrows.from&&(f="arrow",u=o[l.arrows.from].value.from.type,o[l.arrows.from]={attr:o[l.arrows.from].attr,name:o[l.arrows.from].name,value:{to:{enabled:!0,type:f},from:{enabled:!0,type:u}}});else if(c==="back")l.arrows.to&&l.arrows.from?(f="",u=o[l.arrows.from].value.from.type,o[l.arrows.from]={attr:o[l.arrows.from].attr,name:o[l.arrows.from].name,value:{to:{enabled:!0,type:f},from:{enabled:!0,type:u}}}):l.arrows.to?(f="",u="arrow",l.arrows.from=l.arrows.to,o[l.arrows.from]={attr:o[l.arrows.from].attr,name:o[l.arrows.from].name,value:{to:{enabled:!0,type:f},from:{enabled:!0,type:u}}}):l.arrows.from&&(f="",u=o[l.arrows.from].value.from.type,o[l.arrows.to]={attr:o[l.arrows.from].attr,name:o[l.arrows.from].name,value:{to:{enabled:!0,type:f},from:{enabled:!0,type:u}}}),o[l.arrows.from]={attr:o[l.arrows.from].attr,name:o[l.arrows.from].name,value:{from:{enabled:!0,type:o[l.arrows.from].value.from.type}}};else if(c==="none"){var p;l.arrows.to?p=l.arrows.to:p=l.arrows.from,o[p]={attr:o[p].attr,name:o[p].name,value:""}}else if(c==="forward")l.arrows.to&&l.arrows.from?(f=o[l.arrows.to].value.to.type,u="",o[l.arrows.to]={attr:o[l.arrows.to].attr,name:o[l.arrows.to].name,value:{to:{enabled:!0,type:f},from:{enabled:!0,type:u}}}):l.arrows.to?(f=o[l.arrows.to].value.to.type,u="",o[l.arrows.to]={attr:o[l.arrows.to].attr,name:o[l.arrows.to].name,value:{to:{enabled:!0,type:f},from
Line truncated
|
||||
`),e=e.replace(/\r/g,`
|
||||
`);let s=String(e).split(`
|
||||
`),o=s.length;if(t.multi)for(let n=0;n<o;n++){let a=this.splitBlocks(s[n],t.multi);if(a!==void 0){if(a.length===0){this.lines.newLine("");continue}if(t.maxWdt>0)for(let d=0;d<a.length;d++){let h=a[d].mod,l=a[d].text;this.splitStringIntoLines(l,h,!0)}else for(let d=0;d<a.length;d++){let h=a[d].mod,l=a[d].text;this.lines.append(l,h)}this.lines.newLine()}}else if(t.maxWdt>0)for(let n=0;n<o;n++)this.splitStringIntoLines(s[n]);else for(let n=0;n<o;n++)this.lines.newLine(s[n]);return this.lines.finalize()}decodeMarkupSystem(e){let t="none";return e==="markdown"||e==="md"?t="markdown":(e===!0||e==="html")&&(t="html"),t}splitHtmlBlocks(e){let t=new Pi(e),s=o=>/&/.test(o)?(t.replace(t.text,"<","<")||t.replace(t.text,"&","&")||t.add("&"),!0):!1;for(;t.position<t.text.length;){let o=t.text.charAt(t.position);t.parseWS(o)||/</.test(o)&&(t.parseStartTag("bold","<b>")||t.parseStartTag("ital","<i>")||t.parseStartTag("mono","<code>")||t.parseEndTag("bold","</b>")||t.parseEndTag("ital","</i>")||t.parseEndTag("mono","</code>"))||s(o)||t.add(o),t.position++}return t.emitBlock(),t.blocks}splitMarkdownBlocks(e){let t=new Pi(e),s=!0,o=n=>/\\/.test(n)?(t.position<this.text.length+1&&(t.position++,n=this.text.charAt(t.position),/ \t/.test(n)?t.spacing=!0:(t.add(n),s=!1)),!0):!1;for(;t.position<t.text.length;){let n=t.text.charAt(t.position);t.parseWS(n)||o(n)||(s||t.spacing)&&(t.parseStartTag("bold","*")||t.parseStartTag("ital","_")||t.parseStartTag("mono","`"))||t.parseEndTag("bold","*","afterBold")||t.parseEndTag("ital","_","afterItal")||t.parseEndTag("mono","`","afterMono")||(t.add(n),s=!1),t.position++}return t.emitBlock(),t.blocks}splitBlocks(e,t){let s=this.decodeMarkupSystem(t);if(s==="none")return[{text:e,mod:"normal"}];if(s==="markdown")return this.splitMarkdownBlocks(e);if(s==="html")return this.splitHtmlBlocks(e)}overMaxWidth(e){let t=this.ctx.measureText(e).width;return this.lines.curWidth()+t>this.parent.fontOptions.maxWdt}getLongestFit(e){let t="",s=0;for(;s<e.length;){let n=t+(t===""?"":" ")+e[s];if(this.overMaxWidth(n))break;t=n,s++}return s}getLongestFitWord(e){let t=0;for(;t<e.length&&!this.overMaxWidth(e.slice(0,t));)t++;return t}splitStringIntoLines(e,t="normal",s=!1){this.parent.getFormattingValues(this.ctx,this.selected,this.hover,t),e=e.replace(/^( +)/g,"$1\r"),e=e.replace(/([^\r][^ ]*)( +)/g,"$1\r$2\r");let o=e.split("\r");for(;o.length>0;){let n=this.getLongestFit(o);if(n===0){let a=o[0],d=this.getLongestFitWord(a);this.lines.newLine(a.slice(0,d),t),o[0]=a.slice(d)}else{let a=n;o[n-1]===" "?n--:o[a]===" "&&a++;let d=o.slice(0,n).join("");n==o.length&&s?this.lines.append(d,t):this.lines.newLine(d,t),o=o.slice(a)}}}},Kt=["bold","ital","boldital","mono"],Je=class{constructor(e,t,s=!1){this.body=e,this.pointToSelf=!1,this.baseSize=void 0,this.fontOptions={},this.setOptions(t),this.size={top:0,left:0,width:0,height:0,yLine:0},this.isEdgeLabel=s}setOptions(e){if(this.elementOptions=e,this.initFontOptions(e.font),Gt(e.label)?this.labelDirty=!0:e.label=void 0,e.font!==void 0&&e.font!==null){if(typeof e.font=="string")this.baseSize=this.fontOptions.size;else if(typeof e.font=="object"){let t=e.font.size;t!==void 0&&(this.baseSize=t)}}}initFontOptions(e){if(F(Kt,t=>{this.fontOptions[t]={}}),Je.parseFontString(this.fontOptions,e)){this.fontOptions.vadjust=0;return}F(e,(t,s)=>{t!=null&&typeof t!="object"&&(this.fontOptions[s]=t)})}static parseFontString(e,t){if(!t||typeof t!="string")return!1;let s=t.split(" ");return e.size=+s[0].replace("px",""),e.face=s[1],e.color=s[2],!0}constrain(e){let t={constrainWidth:!1,maxWdt:-1,minWdt:-1,constrainHeight:!1,minHgt:-1,valign:"middle"},s=Ie(e,"widthConstraint");if(typeof s=="number")t.maxWdt=Number(s),t.minWdt=Number(s);else if(typeof s=="object"){let n=Ie(e,["widthConstraint","maximum"]);typeof n=="number"&&(t.maxWdt=Number(n));let a=Ie(e,["widthConstraint","minimum"]);typeof a=="number"&&(t.minWdt=Number(a))}let o=Ie(e,"heightConstraint");if(typeof o=="number")t.minHgt=Number(o);else if(typeof o=="object"){let n=Ie(e,["heightConstraint","minimum"]);typeof n=="number"&&(t.minHgt=Number(n));let a=Ie(e,["heightConstraint","valign"]);typeof a=="string"&&(a==="top"||a==="bottom")&&(t.valign=a)}return t}update(e,t){this.setOptions(e,!0),this.propagateFonts(t),V(this.fontOptions,this.constrain(t)),this.fontOptions.chooser=Oi("label",t)}adjustSizes(e){let t=e?e.right+e.left:0;this.fontOptions.constrainWidth&&(this.fontOptions.maxWdt-=t,this.fontOptions.minWdt-=t);let s=e?e.top+e.bottom:0;this.fontOptions.constrainHeight&&(this.fontOptions.minHgt-=s)}addFontOptionsToPile(e,t){for(let s=0;s<t.length;++s)this.addFontToPile(e,t[s])}addFontToPile(e,t){if(t===void 0||t.font===void 0||t.font===null)return;let s=t.font;e.push(s)}getBasicOptions(e){let t={};for(let s=0;s<e.length;++s){let o=e[s],n={};Je.parseFontString(n,o)&&(o=n),F(o,(a,d)=>{a!==void 0&&(Object.prototype.hasOwnProperty.call(t,d)||(Kt.indexOf(d)!==-1?t[d]={}:t[d]=a))})}return t}getFontOption(e,t,s){let o;for(let n=0;
Line truncated
|
||||
`),o=s.length;if(t.multi)for(let n=0;n<o;n++){let a=this.splitBlocks(s[n],t.multi);if(a!==void 0){if(a.length===0){this.lines.newLine("");continue}if(t.maxWdt>0)for(let d=0;d<a.length;d++){let h=a[d].mod,l=a[d].text;this.splitStringIntoLines(l,h,!0)}else for(let d=0;d<a.length;d++){let h=a[d].mod,l=a[d].text;this.lines.append(l,h)}this.lines.newLine()}}else if(t.maxWdt>0)for(let n=0;n<o;n++)this.splitStringIntoLines(s[n]);else for(let n=0;n<o;n++)this.lines.newLine(s[n]);return this.lines.finalize()}decodeMarkupSystem(e){let t="none";return e==="markdown"||e==="md"?t="markdown":(e===!0||e==="html")&&(t="html"),t}splitHtmlBlocks(e){let t=new Di(e),s=o=>/&/.test(o)?(t.replace(t.text,"<","<")||t.replace(t.text,"&","&")||t.add("&"),!0):!1;for(;t.position<t.text.length;){let o=t.text.charAt(t.position);t.parseWS(o)||/</.test(o)&&(t.parseStartTag("bold","<b>")||t.parseStartTag("ital","<i>")||t.parseStartTag("mono","<code>")||t.parseEndTag("bold","</b>")||t.parseEndTag("ital","</i>")||t.parseEndTag("mono","</code>"))||s(o)||t.add(o),t.position++}return t.emitBlock(),t.blocks}splitMarkdownBlocks(e){let t=new Di(e),s=!0,o=n=>/\\/.test(n)?(t.position<this.text.length+1&&(t.position++,n=this.text.charAt(t.position),/ \t/.test(n)?t.spacing=!0:(t.add(n),s=!1)),!0):!1;for(;t.position<t.text.length;){let n=t.text.charAt(t.position);t.parseWS(n)||o(n)||(s||t.spacing)&&(t.parseStartTag("bold","*")||t.parseStartTag("ital","_")||t.parseStartTag("mono","`"))||t.parseEndTag("bold","*","afterBold")||t.parseEndTag("ital","_","afterItal")||t.parseEndTag("mono","`","afterMono")||(t.add(n),s=!1),t.position++}return t.emitBlock(),t.blocks}splitBlocks(e,t){let s=this.decodeMarkupSystem(t);if(s==="none")return[{text:e,mod:"normal"}];if(s==="markdown")return this.splitMarkdownBlocks(e);if(s==="html")return this.splitHtmlBlocks(e)}overMaxWidth(e){let t=this.ctx.measureText(e).width;return this.lines.curWidth()+t>this.parent.fontOptions.maxWdt}getLongestFit(e){let t="",s=0;for(;s<e.length;){let n=t+(t===""?"":" ")+e[s];if(this.overMaxWidth(n))break;t=n,s++}return s}getLongestFitWord(e){let t=0;for(;t<e.length&&!this.overMaxWidth(e.slice(0,t));)t++;return t}splitStringIntoLines(e,t="normal",s=!1){this.parent.getFormattingValues(this.ctx,this.selected,this.hover,t),e=e.replace(/^( +)/g,"$1\r"),e=e.replace(/([^\r][^ ]*)( +)/g,"$1\r$2\r");let o=e.split("\r");for(;o.length>0;){let n=this.getLongestFit(o);if(n===0){let a=o[0],d=this.getLongestFitWord(a);this.lines.newLine(a.slice(0,d),t),o[0]=a.slice(d)}else{let a=n;o[n-1]===" "?n--:o[a]===" "&&a++;let d=o.slice(0,n).join("");n==o.length&&s?this.lines.append(d,t):this.lines.newLine(d,t),o=o.slice(a)}}}},$t=["bold","ital","boldital","mono"],Je=class{constructor(e,t,s=!1){this.body=e,this.pointToSelf=!1,this.baseSize=void 0,this.fontOptions={},this.setOptions(t),this.size={top:0,left:0,width:0,height:0,yLine:0},this.isEdgeLabel=s}setOptions(e){if(this.elementOptions=e,this.initFontOptions(e.font),Kt(e.label)?this.labelDirty=!0:e.label=void 0,e.font!==void 0&&e.font!==null){if(typeof e.font=="string")this.baseSize=this.fontOptions.size;else if(typeof e.font=="object"){let t=e.font.size;t!==void 0&&(this.baseSize=t)}}}initFontOptions(e){if(F($t,t=>{this.fontOptions[t]={}}),Je.parseFontString(this.fontOptions,e)){this.fontOptions.vadjust=0;return}F(e,(t,s)=>{t!=null&&typeof t!="object"&&(this.fontOptions[s]=t)})}static parseFontString(e,t){if(!t||typeof t!="string")return!1;let s=t.split(" ");return e.size=+s[0].replace("px",""),e.face=s[1],e.color=s[2],!0}constrain(e){let t={constrainWidth:!1,maxWdt:-1,minWdt:-1,constrainHeight:!1,minHgt:-1,valign:"middle"},s=Pe(e,"widthConstraint");if(typeof s=="number")t.maxWdt=Number(s),t.minWdt=Number(s);else if(typeof s=="object"){let n=Pe(e,["widthConstraint","maximum"]);typeof n=="number"&&(t.maxWdt=Number(n));let a=Pe(e,["widthConstraint","minimum"]);typeof a=="number"&&(t.minWdt=Number(a))}let o=Pe(e,"heightConstraint");if(typeof o=="number")t.minHgt=Number(o);else if(typeof o=="object"){let n=Pe(e,["heightConstraint","minimum"]);typeof n=="number"&&(t.minHgt=Number(n));let a=Pe(e,["heightConstraint","valign"]);typeof a=="string"&&(a==="top"||a==="bottom")&&(t.valign=a)}return t}update(e,t){this.setOptions(e,!0),this.propagateFonts(t),V(this.fontOptions,this.constrain(t)),this.fontOptions.chooser=Ii("label",t)}adjustSizes(e){let t=e?e.right+e.left:0;this.fontOptions.constrainWidth&&(this.fontOptions.maxWdt-=t,this.fontOptions.minWdt-=t);let s=e?e.top+e.bottom:0;this.fontOptions.constrainHeight&&(this.fontOptions.minHgt-=s)}addFontOptionsToPile(e,t){for(let s=0;s<t.length;++s)this.addFontToPile(e,t[s])}addFontToPile(e,t){if(t===void 0||t.font===void 0||t.font===null)return;let s=t.font;e.push(s)}getBasicOptions(e){let t={};for(let s=0;s<e.length;++s){let o=e[s],n={};Je.parseFontString(n,o)&&(o=n),F(o,(a,d)=>{a!==void 0&&(Object.prototype.hasOwnProperty.call(t,d)||($t.indexOf(d)!==-1?t[d]={}:t[d]=a))})}return t}getFontOption(e,t,s){let o;for(let n=0;
Line truncated
|
||||
/*! Hammer.JS - v2.0.17-rc - 2019-12-16
|
||||
* http://naver.github.io/egjs
|
||||
*
|
||||
|
||||
@@ -333,7 +333,7 @@ const coordSaveCheckbox = document.querySelector('#id_save_coords')
|
||||
// Extract node ids and node type ids from all nodes
|
||||
for (let [key, value] of nodes._data) {
|
||||
if (value[typeId] != undefined) {
|
||||
nodesArray.push([value.id, value[typeId], value[type]]);
|
||||
nodesArray.push([value.id, value[typeId], value[type], value.label_num_lines]);
|
||||
}
|
||||
}
|
||||
// Split single array above into arrays grouped by node id
|
||||
@@ -390,16 +390,24 @@ const coordSaveCheckbox = document.querySelector('#id_save_coords')
|
||||
const rectangles = [];
|
||||
const xValues = [];
|
||||
const yValues = [];
|
||||
const yValuesWithLabel = [];
|
||||
const labelLineHeight = 16;
|
||||
|
||||
for(let val of value[1]) {
|
||||
// Get coordinates for every node in a given group
|
||||
for(let val of value[1]) {
|
||||
xValues.push(graph.getPosition(val[0]).x);
|
||||
yValues.push(graph.getPosition(val[0]).y);
|
||||
yValuesWithLabel.push(yValues[yValues.length -1] + val[3] * labelLineHeight);
|
||||
}
|
||||
|
||||
const rectX = Math.min(...xValues) - rectParams.paddingX;
|
||||
const rectY = Math.min(...yValues) - rectParams.paddingY;
|
||||
const rectSizeX = Math.max(...xValues) - Math.min(...xValues) + 2*rectParams.paddingX;
|
||||
const rectSizeY = Math.max(...yValues) - Math.min(...yValues) + 2*rectParams.paddingY;
|
||||
const minX = Math.min(...xValues);
|
||||
const maxX = Math.max(...xValues);
|
||||
const minY = Math.min(...yValues);
|
||||
const maxY = Math.max(...yValuesWithLabel);
|
||||
const rectX = minX - rectParams.paddingX;
|
||||
const rectY = minY - rectParams.paddingY;
|
||||
const rectSizeX = maxX - minX + 2*rectParams.paddingX;
|
||||
const rectSizeY = maxY - minY + 2*rectParams.paddingY;
|
||||
|
||||
rectangles.push({
|
||||
ctx: canvascontext,
|
||||
|
||||
@@ -251,6 +251,7 @@ def create_node(
|
||||
node["shape"] = "image"
|
||||
node["href"] = device.get_absolute_url()
|
||||
node["image"] = get_image_for_entity(device)
|
||||
node["label_num_lines"] = len(label_items)
|
||||
|
||||
return node
|
||||
|
||||
|
||||
Reference in new issue
Block a user