feat: 后端全量更新 - 含所有本次需求
- Contract.php: 返回合约账户余额(balance_contract) - My.php: 地址管理增加BTC/ETH - AppContract.php: 一键平仓(closeall) - AppProxy.php: 代理专属注册链接 + 分级权限(L1/L2) - site.php: 手续费减半(0.018→0.009) - agent_permission_setup.sql: 代理权限SQL - crypto_news_crawler.py: 新闻自动采集脚本
This commit is contained in:
Executable
+83
@@ -0,0 +1,83 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Curviness</title>
|
||||
<!-- Copyright 1998-2020 by Northwoods Software Corporation. -->
|
||||
<meta name="description" content="Links with different amounts of curviness." />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
<script src="../release/go.js"></script>
|
||||
<script src="../assets/js/goSamples.js"></script> <!-- this is only for the GoJS Samples framework -->
|
||||
<script id="code">
|
||||
function init() {
|
||||
if (window.goSamples) goSamples(); // init for these samples -- you don't need to call this
|
||||
var $ = go.GraphObject.make; // for conciseness in defining templates
|
||||
|
||||
myDiagram = $(go.Diagram, "myDiagramDiv", // create a Diagram for the DIV HTML element
|
||||
{
|
||||
"undoManager.isEnabled": true
|
||||
});
|
||||
|
||||
// define a simple Node template
|
||||
myDiagram.nodeTemplate =
|
||||
$(go.Node, "Auto",
|
||||
new go.Binding("position", "position"),
|
||||
$(go.Shape, "RoundedRectangle",
|
||||
// Shape.fill is bound to Node.data.color
|
||||
new go.Binding("fill", "color")),
|
||||
$(go.TextBlock,
|
||||
{ margin: 3 }, // some room around the text
|
||||
// TextBlock.text is bound to Node.data.key
|
||||
new go.Binding("text", "key"))
|
||||
);
|
||||
|
||||
myDiagram.linkTemplate =
|
||||
$(go.Link, go.Link.Bezier,
|
||||
// when using fromSpot/toSpot:
|
||||
{ fromSpot: go.Spot.Left, toSpot: go.Spot.Left },
|
||||
new go.Binding("fromEndSegmentLength", "curviness"),
|
||||
new go.Binding("toEndSegmentLength", "curviness"),
|
||||
|
||||
// if not using fromSpot/toSpot, use a binding to curviness instead:
|
||||
//new go.Binding("curviness", "curviness"),
|
||||
|
||||
$(go.Shape, // the link shape
|
||||
{ stroke: "black", strokeWidth: 1.5 }),
|
||||
|
||||
$(go.Shape, // the arrowhead, at the mid point of the link
|
||||
{ toArrow: "OpenTriangle", segmentIndex: -Infinity })
|
||||
);
|
||||
|
||||
// create the model data that will be represented by Nodes and Links
|
||||
myDiagram.model = new go.GraphLinksModel(
|
||||
[
|
||||
{ position: new go.Point(100, 100), key: "Alpha", color: "lightblue" },
|
||||
{ position: new go.Point(100, 200), key: "Beta", color: "orange" },
|
||||
{ position: new go.Point(100, 300), key: "Gamma", color: "lightgreen" },
|
||||
{ position: new go.Point(100, 400), key: "Delta", color: "pink" }
|
||||
],
|
||||
[
|
||||
// The links have different curviness values.
|
||||
// Set by hand here, they are larger when the two nodes are farther away
|
||||
{ from: "Alpha", to: "Beta", curviness: 20 },
|
||||
{ from: "Alpha", to: "Gamma", curviness: 40 },
|
||||
{ from: "Gamma", to: "Delta", curviness: 20 },
|
||||
{ from: "Delta", to: "Alpha", curviness: 60 }
|
||||
]);
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body onload="init()">
|
||||
<div id="sample">
|
||||
<div id="myDiagramDiv" style="border: solid 1px black; width:500px; height:500px"></div>
|
||||
<p>
|
||||
This sample explicitly binds the <a>Link.curviness</a> property, so that some links bend out farther than others.
|
||||
</p>
|
||||
<p>
|
||||
The link template also places an arrowhead at the middle of the link,
|
||||
by explicitly setting the arrowhead's <a>GraphObject.segmentIndex</a> to -Infinity
|
||||
<i>after</i> setting <a>Shape.toArrow</a>.
|
||||
</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user