From ee3b91888fd0aa9e110d803d0a454bfe22a6eed2 Mon Sep 17 00:00:00 2001 From: 5upermario <5upermario@users.noreply.github.com> Date: Sun, 29 Dec 2019 21:59:51 +0100 Subject: [PATCH 1/4] add overflow-x: auto to view container this way we can scroll horizontally the svg inside the container --- src/components/View.svelte | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/View.svelte b/src/components/View.svelte index efc6e094..f7e1f73e 100644 --- a/src/components/View.svelte +++ b/src/components/View.svelte @@ -113,6 +113,9 @@ let insertSvg = function(svgCode, bindFunctions){ border: 1px solor darkred; flex: 1; } + #container { + overflow-x: auto; + } .error { opacity: 0.5; } @@ -120,4 +123,4 @@ let insertSvg = function(svgCode, bindFunctions){
+ + +
\ No newline at end of file From 5d320bcead8256c88aa547b4e49f8786ddd67071 Mon Sep 17 00:00:00 2001 From: Emile Nijssen=0;r--){for(var c=t.words[r],l=u-1;l>=0;l--){var d=c>>l&1;i!==n[0]&&(i=this.sqr(i)),0!==d||0!==s?(s<<=1,s|=d,(4===++a||0===r&&0===l)&&(i=this.mul(i,n[s]),a=0,s=0)):a=0}u=26}return i},C.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},C.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new S(e)},i(S,C),S.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},S.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},S.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},S.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var n=e.mul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},S.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e,this)}).call(this,n(30)(e))},function(e,t){var n=Array.isArray;e.exports=n},function(e,t,n){"use strict";(function(e){
+!function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=478)}([function(e,t,n){(function(e){e.exports=function(){"use strict";var t,r;function i(){return t.apply(null,arguments)}function o(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function s(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function a(e){return void 0===e}function u(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function c(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function l(e,t){var n,r=[];for(n=0;n =0;r--){for(var c=t.words[r],l=u-1;l>=0;l--){var d=c>>l&1;i!==n[0]&&(i=this.sqr(i)),0!==d||0!==s?(s<<=1,s|=d,(4===++a||0===r&&0===l)&&(i=this.mul(i,n[s]),a=0,s=0)):a=0}u=26}return i},C.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},C.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new S(e)},i(S,C),S.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},S.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},S.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},S.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var n=e.mul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},S.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e,this)}).call(this,n(52)(e))},function(e,t){var n=Array.isArray;e.exports=n},function(e,t,n){"use strict";var r=n(56),i=n(94),o=function(e){return Object(i.a)(Object(r.a)(e).call(document.documentElement))},s=0;function a(){return new u}function u(){this._="@"+(++s).toString(36)}u.prototype=a.prototype={constructor:u,get:function(e){for(var t=this._;!(t in e);)if(!(e=e.parentNode))return;return e[t]},set:function(e,t){return e[this._]=t},remove:function(e){return this._ in e&&delete e[this._]},toString:function(){return this._}};var c=n(164),l=n(264),d=n(86),h=n(59),f=n(57),p=n(45),g=function(e){return"string"==typeof e?new p.a([document.querySelectorAll(e)],[document.documentElement]):new p.a([null==e?[]:e],p.c)},m=n(87),_=n(165),v=n(166),y=n(263),b=n(93),w=function(e,t){null==t&&(t=Object(b.a)().touches);for(var n=0,r=t?t.length:0,i=new Array(r);n =0&&(e=e.slice(0,t)),!e||"start"===e}))}(t)?_:v;return function(){var s=o(this,e),a=s.on;a!==r&&(i=(r=a).copy()).on(t,n),s.on=i}}var q=n(87),K=n(165),G=r.b.prototype.constructor,$=n(166);function Z(e){return function(){this.style.removeProperty(e)}}function J(e,t,n){var r,i;function o(){var o=t.apply(this,arguments);return o!==i&&(r=(i=o)&&function(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}(e,o,n)),r}return o._value=t,o}function X(e){var t,n;function r(){var r=e.apply(this,arguments);return r!==n&&(t=(n=r)&&function(e){return function(t){this.textContent=e.call(this,t)}}(r)),t}return r._value=e,r}var Q=0;function ee(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function te(e){return Object(r.b)().transition(e)}function ne(){return++Q}var re=r.b.prototype;ee.prototype=te.prototype={constructor:ee,select:function(e){var t=this._name,n=this._id;"function"!=typeof e&&(e=Object(q.a)(e));for(var r=this._groups,i=r.length,o=new Array(i),s=0;sl&&n.name===t)return new ee([[e]],se,t,+r);return null};n.d(t,"c",(function(){return te})),n.d(t,"a",(function(){return ae})),n.d(t,"b",(function(){return b}))},function(e,t,n){"use strict";n.d(t,"b",(function(){return i}));var r=n(43);function i(){r.c.stopImmediatePropagation()}t.a=function(){r.c.preventDefault(),r.c.stopImmediatePropagation()}},function(e,t){var n,r,i=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(e){if(n===setTimeout)return setTimeout(e,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(e){n=o}try{r="function"==typeof clearTimeout?clearTimeout:s}catch(e){r=s}}();var u,c=[],l=!1,d=-1;function h(){l&&u&&(l=!1,u.length?c=u.concat(c):d=-1,c.length&&f())}function f(){if(!l){var e=a(h);l=!0;for(var t=c.length;t;){for(u=c,c=[];++d=r.length)return null!=e&&n.sort(e),null!=t?t(n):n;for(var c,l,d,h=-1,f=n.length,p=r[i++],g=o(),m=a();++h
/g,"#br#")).replace(/
/g,"#br#")).replace(//g,">")).replace(/=/g,"=")).replace(/#br#/g,"
")),t},w=function(e,t,n,r,i){var o,s=e;void 0!==s&&0!==s.trim().length&&(s[0].match(/\d/)&&(s=""+s),void 0===d[s]&&(d[s]={id:s,styles:[],classes:[]}),void 0!==t?('"'===(o=b(t.trim()))[0]&&'"'===o[o.length-1]&&(o=o.substring(1,o.length-1)),d[s].text=o):d[s].text||(d[s].text=e),void 0!==n&&(d[s].type=n),null!=r&&r.forEach((function(e){d[s].styles.push(e)})),null!=i&&i.forEach((function(e){d[s].classes.push(e)})))},C=function(e,t,n,r){var i=e,s=t;i[0].match(/\d/)&&(i=""+i),s[0].match(/\d/)&&(s=""+s),o.logger.info("Got edge...",i,s);var a={start:i,end:s,type:void 0,text:""};void 0!==(r=n.text)&&(a.text=b(r.trim()),'"'===a.text[0]&&'"'===a.text[a.text.length-1]&&(a.text=a.text.substring(1,a.text.length-1))),void 0!==n&&(a.type=n.type,a.stroke=n.stroke),h.push(a)},S=function(e,t){e.forEach((function(e){"default"===e?h.defaultInterpolate=t:h[e].interpolate=t}))},L=function(e,t){e.forEach((function(e){"default"===e?h.defaultStyle=t:(-1===s.default.isSubstringInArray("fill",t)&&t.push("fill:none"),h[e].style=t)}))},x=function(e,t){void 0===f[e]&&(f[e]={id:e,styles:[]}),null!=t&&t.forEach((function(t){f[e].styles.push(t)}))},k=function(e){(c=e).match(/.*)&&(c="RL"),c.match(/.*\^/)&&(c="BT"),c.match(/.*>/)&&(c="LR"),c.match(/.*v/)&&(c="TB")},M=function(e,t){e.split(",").forEach((function(e){var n=e;e[0].match(/\d/)&&(n=""+n),void 0!==d[n]&&d[n].classes.push(t),void 0!==g[n]&&g[n].classes.push(t)}))},D=function(e,t){e.split(",").forEach((function(e){void 0!==t&&(m[e]=b(t))}))},E=function(e,t,n){e.split(",").forEach((function(e){var n=e;e[0].match(/\d/)&&(n=""+n),void 0!==d[n]&&("loose"!==l.securityLevel?d[n].link=Object(i.sanitizeUrl)(t):d[n].link=t)})),D(e,n),M(e,"clickable")},T=function(e){return m[e]},N=function(e,t,n){e.split(",").forEach((function(e){!function(e,t){var n=e;e[0].match(/\d/)&&(n=""+n),"loose"===l.securityLevel&&void 0!==t&&void 0!==d[n]&&y.push((function(){var e=document.querySelector('[id="'.concat(n,'"]'));null!==e&&e.addEventListener("click",(function(){window[t](n)}),!1)}))}(e,t)})),D(e,n),M(e,"clickable")},A=function(e){y.forEach((function(t){t(e)}))},O=function(){return c.trim()},I=function(){return d},P=function(){return h},R=function(){return f},F=function(e){var t=r.select(".mermaidTooltip");null===(t._groups||t)[0][0]&&(t=r.select("body").append("div").attr("class","mermaidTooltip").style("opacity",0)),r.select(e).select("svg").selectAll("g.node").on("mouseover",(function(){var e=r.select(this);if(null!==e.attr("title")){var n=this.getBoundingClientRect();t.transition().duration(200).style("opacity",".9"),t.html(e.attr("title")).style("left",n.left+(n.right-n.left)/2+"px").style("top",n.top-14+document.body.scrollTop+"px"),e.classed("hover",!0)}})).on("mouseout",(function(){t.transition().duration(500).style("opacity",0),r.select(this).classed("hover",!1)}))};y.push(F);var Y=function(){d={},f={},h=[],(y=[]).push(F),p=[],g={},_=0,m=[],v=!0},B=function(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"},H=function(e,t,n){var r=e,i=n;e===n&&n.match(/\s/)&&(r=void 0);var o,s,a,c=[];o=c.concat.apply(c,t),s={boolean:{},number:{},string:{}},a=[],c=o.filter((function(e){var t=u(e);return""!==e.trim()&&(t in s?!s[t].hasOwnProperty(e)&&(s[t][e]=!0):!(a.indexOf(e)>=0)&&a.push(e))}));for(var l=0;l
/g,"#br#")).replace(/
/g,"#br#")).replace(//g,">")).replace(/=/g,"=")).replace(/#br#/g,"
")),t},w=function(e,t,n,r,i){var o,s=e;void 0!==s&&0!==s.trim().length&&(s[0].match(/\d/)&&(s=""+s),void 0===d[s]&&(d[s]={id:s,styles:[],classes:[]}),void 0!==t?('"'===(o=b(t.trim()))[0]&&'"'===o[o.length-1]&&(o=o.substring(1,o.length-1)),d[s].text=o):d[s].text||(d[s].text=e),void 0!==n&&(d[s].type=n),null!=r&&r.forEach((function(e){d[s].styles.push(e)})),null!=i&&i.forEach((function(e){d[s].classes.push(e)})))},C=function(e,t,n,r){var i=e,s=t;i[0].match(/\d/)&&(i=""+i),s[0].match(/\d/)&&(s=""+s),o.logger.info("Got edge...",i,s);var a={start:i,end:s,type:void 0,text:""};void 0!==(r=n.text)&&(a.text=b(r.trim()),'"'===a.text[0]&&'"'===a.text[a.text.length-1]&&(a.text=a.text.substring(1,a.text.length-1))),void 0!==n&&(a.type=n.type,a.stroke=n.stroke),h.push(a)},S=function(e,t){e.forEach((function(e){"default"===e?h.defaultInterpolate=t:h[e].interpolate=t}))},L=function(e,t){e.forEach((function(e){"default"===e?h.defaultStyle=t:(-1===s.default.isSubstringInArray("fill",t)&&t.push("fill:none"),h[e].style=t)}))},x=function(e,t){void 0===f[e]&&(f[e]={id:e,styles:[]}),null!=t&&t.forEach((function(t){f[e].styles.push(t)}))},k=function(e){(c=e).match(/.*)&&(c="RL"),c.match(/.*\^/)&&(c="BT"),c.match(/.*>/)&&(c="LR"),c.match(/.*v/)&&(c="TB")},M=function(e,t){e.split(",").forEach((function(e){var n=e;e[0].match(/\d/)&&(n=""+n),void 0!==d[n]&&d[n].classes.push(t),void 0!==g[n]&&g[n].classes.push(t)}))},D=function(e,t){e.split(",").forEach((function(e){void 0!==t&&(m[e]=b(t))}))},E=function(e,t,n){e.split(",").forEach((function(e){var n=e;e[0].match(/\d/)&&(n=""+n),void 0!==d[n]&&("loose"!==l.securityLevel?d[n].link=Object(i.sanitizeUrl)(t):d[n].link=t)})),D(e,n),M(e,"clickable")},T=function(e){return m[e]},N=function(e,t,n){e.split(",").forEach((function(e){!function(e,t){var n=e;e[0].match(/\d/)&&(n=""+n),"loose"===l.securityLevel&&void 0!==t&&void 0!==d[n]&&y.push((function(){var e=document.querySelector('[id="'.concat(n,'"]'));null!==e&&e.addEventListener("click",(function(){window[t](n)}),!1)}))}(e,t)})),D(e,n),M(e,"clickable")},A=function(e){y.forEach((function(t){t(e)}))},O=function(){return c.trim()},I=function(){return d},P=function(){return h},R=function(){return f},F=function(e){var t=r.select(".mermaidTooltip");null===(t._groups||t)[0][0]&&(t=r.select("body").append("div").attr("class","mermaidTooltip").style("opacity",0)),r.select(e).select("svg").selectAll("g.node").on("mouseover",(function(){var e=r.select(this);if(null!==e.attr("title")){var n=this.getBoundingClientRect();t.transition().duration(200).style("opacity",".9"),t.html(e.attr("title")).style("left",n.left+(n.right-n.left)/2+"px").style("top",n.top-14+document.body.scrollTop+"px"),e.classed("hover",!0)}})).on("mouseout",(function(){t.transition().duration(500).style("opacity",0),r.select(this).classed("hover",!1)}))};y.push(F);var Y=function(){d={},f={},h=[],(y=[]).push(F),p=[],g={},_=0,m=[],v=!0},B=function(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"},j=function(e,t,n){var r=e,i=n;e===n&&n.match(/\s/)&&(r=void 0);var o,s,a,c=[];o=c.concat.apply(c,t),s={boolean:{},number:{},string:{}},a=[],c=o.filter((function(e){var t=u(e);return""!==e.trim()&&(t in s?!s[t].hasOwnProperty(e)&&(s[t][e]=!0):!(a.indexOf(e)>=0)&&a.push(e))}));for(var l=0;l