add local script for drawio
This commit is contained in:
1 parent
c49ee22234
commit
a02898f301
4 files changed
+4018
-159
No files matched your search
+3
-3
@@ -99,7 +99,7 @@
|
||||
|
||||
<!-- Render graph (UML/Mermaid/... -->
|
||||
<script src="//unpkg.com/docsify-kroki">
|
||||
kroki: {
|
||||
kroki:{
|
||||
langs: [
|
||||
"actdiag",
|
||||
"blockdiag",
|
||||
@@ -154,7 +154,7 @@
|
||||
<script src="https://cdn.jsdelivr.net/npm/docsify-select@1"></script>
|
||||
|
||||
<!-- Draw.io -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/docsify-drawio/viewer.min.js"></script>
|
||||
<script src='https://cdn.jsdelivr.net/npm/docsify-drawio/drawio.js'></script>
|
||||
<script src="scripts/viewer.min.js"></script>
|
||||
<script src='scripts/drawio.js'></script>
|
||||
</body>
|
||||
</html>
|
||||
+1
-156
@@ -2,163 +2,8 @@
|
||||
<h1>Sigma / Delta</h1>
|
||||
</header>
|
||||
|
||||
```drawio
|
||||
[sigma-delta.drawio](sigma-delta.drawio ':include :type=code')
|
||||
|
||||
<mxfile host="Electron" modified="2024-01-27T19:14:32.318Z" agent="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/22.1.21 Chrome/120.0.6099.109 Electron/28.1.0 Safari/537.36" etag="_JxO4yykJQa9LzsHiU7_" version="22.1.21" type="device">
|
||||
<diagram name="Page-1" id="ScnFzgmv18Yx9ZM-e3TZ">
|
||||
<mxGraphModel dx="450" dy="363" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0">
|
||||
<root>
|
||||
<mxCell id="0" />
|
||||
<mxCell id="1" parent="0" />
|
||||
<mxCell id="z0oqqv8cwlupup-oO1Ry-11" value="" style="group;strokeColor=none;" parent="1" vertex="1" connectable="0">
|
||||
<mxGeometry x="160" y="380" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="z0oqqv8cwlupup-oO1Ry-7" value="" style="ellipse;whiteSpace=wrap;html=1;aspect=fixed;fillColor=none;strokeColor=#808080;" parent="z0oqqv8cwlupup-oO1Ry-11" vertex="1">
|
||||
<mxGeometry width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="z0oqqv8cwlupup-oO1Ry-8" value="" style="endArrow=none;html=1;rounded=0;strokeColor=#808080;" parent="z0oqqv8cwlupup-oO1Ry-11" edge="1">
|
||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||
<mxPoint x="15" y="30" as="sourcePoint" />
|
||||
<mxPoint x="25" y="30" as="targetPoint" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="z0oqqv8cwlupup-oO1Ry-9" value="" style="endArrow=none;html=1;rounded=0;strokeColor=#808080;" parent="z0oqqv8cwlupup-oO1Ry-11" edge="1">
|
||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||
<mxPoint x="3" y="19.899999999999977" as="sourcePoint" />
|
||||
<mxPoint x="13" y="19.899999999999977" as="targetPoint" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="z0oqqv8cwlupup-oO1Ry-10" value="" style="endArrow=none;html=1;rounded=0;strokeColor=#808080;" parent="z0oqqv8cwlupup-oO1Ry-11" edge="1">
|
||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||
<mxPoint x="8" y="25" as="sourcePoint" />
|
||||
<mxPoint x="8" y="15" as="targetPoint" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="z0oqqv8cwlupup-oO1Ry-12" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;endArrow=block;endFill=1;strokeColor=#808080;" parent="1" source="z0oqqv8cwlupup-oO1Ry-7" target="z0oqqv8cwlupup-oO1Ry-3" edge="1">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="z0oqqv8cwlupup-oO1Ry-13" value="" style="group;strokeColor=none;" parent="1" vertex="1" connectable="0">
|
||||
<mxGeometry x="280" y="360" width="80" height="80" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="z0oqqv8cwlupup-oO1Ry-3" value="" style="triangle;whiteSpace=wrap;html=1;fillColor=none;strokeColor=#808080;" parent="z0oqqv8cwlupup-oO1Ry-13" vertex="1">
|
||||
<mxGeometry width="80" height="80" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="z0oqqv8cwlupup-oO1Ry-4" value="" style="curved=1;endArrow=none;html=1;rounded=0;endFill=0;strokeColor=#808080;" parent="z0oqqv8cwlupup-oO1Ry-13" edge="1">
|
||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||
<mxPoint x="7" y="53" as="sourcePoint" />
|
||||
<mxPoint x="37" y="33" as="targetPoint" />
|
||||
<Array as="points">
|
||||
<mxPoint x="7" y="63" />
|
||||
<mxPoint x="17" y="63" />
|
||||
<mxPoint x="27" y="23" />
|
||||
<mxPoint x="37" y="23" />
|
||||
</Array>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="z0oqqv8cwlupup-oO1Ry-14" value="" style="group;strokeColor=none;" parent="1" vertex="1" connectable="0">
|
||||
<mxGeometry x="440" y="360" width="80" height="80" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="z0oqqv8cwlupup-oO1Ry-5" value="" style="triangle;whiteSpace=wrap;html=1;fillColor=none;strokeColor=#808080;" parent="z0oqqv8cwlupup-oO1Ry-14" vertex="1">
|
||||
<mxGeometry width="80" height="80" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="z0oqqv8cwlupup-oO1Ry-6" value="" style="endArrow=none;html=1;rounded=0;strokeColor=#808080;" parent="z0oqqv8cwlupup-oO1Ry-14" edge="1">
|
||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||
<mxPoint x="8" y="61" as="sourcePoint" />
|
||||
<mxPoint x="28" y="21" as="targetPoint" />
|
||||
<Array as="points">
|
||||
<mxPoint x="18" y="61" />
|
||||
<mxPoint x="18" y="41" />
|
||||
<mxPoint x="18" y="21" />
|
||||
</Array>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="z0oqqv8cwlupup-oO1Ry-15" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;endArrow=block;endFill=1;strokeColor=#808080;" parent="1" source="z0oqqv8cwlupup-oO1Ry-3" target="z0oqqv8cwlupup-oO1Ry-5" edge="1">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="z0oqqv8cwlupup-oO1Ry-16" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;endArrow=block;endFill=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;strokeColor=#808080;" parent="1" target="z0oqqv8cwlupup-oO1Ry-7" edge="1">
|
||||
<mxGeometry relative="1" as="geometry">
|
||||
<mxPoint x="120" y="400" as="sourcePoint" />
|
||||
<mxPoint x="150.00000000000003" y="395" as="targetPoint" />
|
||||
<Array as="points">
|
||||
<mxPoint x="130" y="400" />
|
||||
<mxPoint x="130" y="400" />
|
||||
</Array>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="z0oqqv8cwlupup-oO1Ry-18" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.25;entryDx=0;entryDy=0;endArrow=block;endFill=1;strokeColor=#808080;" parent="1" source="z0oqqv8cwlupup-oO1Ry-5" target="z0oqqv8cwlupup-oO1Ry-17" edge="1">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="z0oqqv8cwlupup-oO1Ry-27" value="" style="group;strokeColor=none;fontColor=#808080;" parent="1" vertex="1" connectable="0">
|
||||
<mxGeometry x="600" y="480" width="80" height="80" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="z0oqqv8cwlupup-oO1Ry-23" value="" style="whiteSpace=wrap;html=1;aspect=fixed;fillColor=none;strokeColor=#808080;" parent="z0oqqv8cwlupup-oO1Ry-27" vertex="1">
|
||||
<mxGeometry width="80" height="80" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="z0oqqv8cwlupup-oO1Ry-24" value="" style="endArrow=none;html=1;rounded=0;exitX=0;exitY=1;exitDx=0;exitDy=0;entryX=1;entryY=0;entryDx=0;entryDy=0;strokeColor=#808080;" parent="z0oqqv8cwlupup-oO1Ry-27" source="z0oqqv8cwlupup-oO1Ry-23" target="z0oqqv8cwlupup-oO1Ry-23" edge="1">
|
||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||
<mxPoint x="60" y="-120" as="sourcePoint" />
|
||||
<mxPoint x="110" y="-170" as="targetPoint" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="z0oqqv8cwlupup-oO1Ry-25" value="<font style="font-size: 20px;"><b>A</b></font>" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontColor=#808080;" parent="z0oqqv8cwlupup-oO1Ry-27" vertex="1">
|
||||
<mxGeometry width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="z0oqqv8cwlupup-oO1Ry-26" value="<font style="font-size: 20px;"><b>D</b></font>" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontColor=#808080;" parent="z0oqqv8cwlupup-oO1Ry-27" vertex="1">
|
||||
<mxGeometry x="40" y="40" width="40" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="z0oqqv8cwlupup-oO1Ry-28" value="" style="group;strokeColor=#808080;fontColor=#808080;" parent="1" vertex="1" connectable="0">
|
||||
<mxGeometry x="600" y="380" width="80" height="80" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="z0oqqv8cwlupup-oO1Ry-17" value="" style="whiteSpace=wrap;html=1;aspect=fixed;fillColor=none;strokeColor=#808080;" parent="z0oqqv8cwlupup-oO1Ry-28" vertex="1">
|
||||
<mxGeometry width="80" height="80" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="z0oqqv8cwlupup-oO1Ry-19" value="" style="endArrow=none;html=1;rounded=0;exitX=0;exitY=0.804;exitDx=0;exitDy=0;exitPerimeter=0;entryX=0.004;entryY=0.68;entryDx=0;entryDy=0;entryPerimeter=0;strokeColor=#808080;" parent="z0oqqv8cwlupup-oO1Ry-28" source="z0oqqv8cwlupup-oO1Ry-17" target="z0oqqv8cwlupup-oO1Ry-17" edge="1">
|
||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||
<mxPoint x="-10" y="70" as="sourcePoint" />
|
||||
<mxPoint x="40" y="20" as="targetPoint" />
|
||||
<Array as="points">
|
||||
<mxPoint x="10" y="60" />
|
||||
</Array>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="z0oqqv8cwlupup-oO1Ry-20" value="D" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontColor=#808080;" parent="z0oqqv8cwlupup-oO1Ry-28" vertex="1">
|
||||
<mxGeometry y="10" width="20" height="20" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="z0oqqv8cwlupup-oO1Ry-22" value="Q" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontColor=#808080;" parent="z0oqqv8cwlupup-oO1Ry-28" vertex="1">
|
||||
<mxGeometry x="60" y="10" width="20" height="20" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="z0oqqv8cwlupup-oO1Ry-29" value="" style="endArrow=classic;html=1;rounded=0;exitX=1;exitY=0.5;exitDx=0;exitDy=0;strokeColor=#808080;" parent="1" source="z0oqqv8cwlupup-oO1Ry-22" edge="1">
|
||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||
<mxPoint x="660" y="370" as="sourcePoint" />
|
||||
<mxPoint x="760" y="400" as="targetPoint" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="z0oqqv8cwlupup-oO1Ry-30" value="" style="endArrow=classic;html=1;rounded=0;entryX=1;entryY=0.25;entryDx=0;entryDy=0;startArrow=oval;startFill=1;strokeColor=#808080;" parent="1" target="z0oqqv8cwlupup-oO1Ry-23" edge="1">
|
||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||
<mxPoint x="720" y="400" as="sourcePoint" />
|
||||
<mxPoint x="710" y="320" as="targetPoint" />
|
||||
<Array as="points">
|
||||
<mxPoint x="720" y="500" />
|
||||
</Array>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="z0oqqv8cwlupup-oO1Ry-31" value="" style="endArrow=classic;html=1;rounded=0;exitX=0;exitY=0.5;exitDx=0;exitDy=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;strokeColor=#808080;" parent="1" source="z0oqqv8cwlupup-oO1Ry-25" target="z0oqqv8cwlupup-oO1Ry-7" edge="1">
|
||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||
<mxPoint x="330" y="450" as="sourcePoint" />
|
||||
<mxPoint x="380" y="400" as="targetPoint" />
|
||||
<Array as="points">
|
||||
<mxPoint x="180" y="500" />
|
||||
</Array>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
</root>
|
||||
</mxGraphModel>
|
||||
</diagram>
|
||||
</mxfile>
|
||||
|
||||
|
||||
|
||||
```
|
||||
|
||||
# Principe
|
||||
Un convertisseur analogique-numérique (AD) ou numérique-analogique (DA) delta-sigma se compose toujours d'un modulateur
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
(function () {
|
||||
// 下面是解析的部分
|
||||
const chatMap = {
|
||||
"&": "&",
|
||||
"'": "'",
|
||||
"`": "`",
|
||||
'"': """,
|
||||
"<": "<",
|
||||
">": ">",
|
||||
};
|
||||
const escapeHTML = (string) => {
|
||||
if (typeof string !== "string") return string;
|
||||
return string.replace(/[&'`"<>]/g, function (match) {
|
||||
return chatMap[match];
|
||||
});
|
||||
};
|
||||
window.drawioConverter = function (xml, idx = new Date().getTime()) {
|
||||
let mxGraphData = {
|
||||
editable: false,
|
||||
highlight: "#0000ff",
|
||||
nav: false,
|
||||
toolbar: null,
|
||||
edit: null,
|
||||
resize: true,
|
||||
lightbox: "open",
|
||||
// "check-visible-state": false,
|
||||
// "auto-fit": false,
|
||||
// move: false,
|
||||
xml,
|
||||
};
|
||||
|
||||
const json = JSON.stringify(mxGraphData);
|
||||
|
||||
return `<div class="drawio-viewer-index-${idx}">
|
||||
<div class="mxgraph" style="max-width: 100%; border: 1px solid transparent" data-mxgraph="${escapeHTML(json)}"></div>
|
||||
</div>
|
||||
`;
|
||||
};
|
||||
|
||||
// 下面是插件加载部分
|
||||
|
||||
const install = function (hook) {
|
||||
hook.doneEach((hook) => {
|
||||
try {
|
||||
window.GraphViewer.processElements();
|
||||
} catch {}
|
||||
});
|
||||
};
|
||||
|
||||
window.$docsify.plugins = [].concat(install, $docsify.plugins);
|
||||
})();
|
||||
Vendored
+3963
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user