{"id":2475,"date":"2018-02-07T14:33:44","date_gmt":"2018-02-07T06:33:44","guid":{"rendered":"http:\/\/www.xttblog.com\/?p=2475"},"modified":"2018-02-07T14:33:44","modified_gmt":"2018-02-07T06:33:44","slug":"%e4%bd%bf%e7%94%a8-hightopo-%e5%ae%9e%e7%8e%b0web%e7%89%88%e7%bd%91%e7%bb%9c%e6%8b%93%e6%89%91%e5%9b%be","status":"publish","type":"post","link":"https:\/\/www.xttblog.com\/?p=2475","title":{"rendered":"\u4f7f\u7528 hightopo \u5b9e\u73b0web\u7248\u7f51\u7edc\u62d3\u6251\u56fe"},"content":{"rendered":"<p>\n\t<a href=\"http:\/\/hightopo.com\" name=\"hightopo\" target=\"_blank\" title=\"hightopo\">hightopo<\/a> \u662f\u4e00\u6b3e\u6536\u8d39\u8f6f\u4ef6\uff0c\u5b83\u53ef\u4ee5\u5f88\u65b9\u4fbf\u7684\u5e2e\u52a9\u6211\u4eec\u5236\u4f5cweb\u7248\u7684\u7f51\u7edc\u62d3\u6251\u56fe\u3002\u5b83\u7684\u5e95\u5c42\u662f <a href=\"https:\/\/www.xttblog.com\/?tag=html5\" name=\"html5\" target=\"_blank\" title=\"html5\">HTML5<\/a> \u7684 <a href=\"https:\/\/www.xttblog.com\/?tag=canvas\" name=\"Canvas\" target=\"_blank\" title=\"Canvas\">Canvas<\/a> \u5b9e\u73b0\u3002<a href=\"http:\/\/hightopo.com\" name=\"hightopo\" target=\"_blank\" title=\"hightopo\">hightopo<\/a> \u7684\u529f\u80fd\u5f88\u5f3a\u5927\uff0c\u53ef\u4ee5\u8f7b\u677e\u5b9e\u73b0\u57fa\u672c\u7f51\u7edc\u56fe\uff0c\u7f51\u7edc\u62d3\u6251\u56fe\uff0c\u673a\u67b6\u56fe\uff0c\u7f51\u7edc\u901a\u4fe1\u56fe\uff0c3D\u7f51\u7edc\u56fe\u7b49\u5176\u4ed6\u51e0\u4e4e\u6240\u6709\u7684\u62d3\u6251\u56fe\u3002\u672c\u6587\u5c06\u4ecb\u7ecd\u5982\u4f55\u4f7f\u7528&nbsp;<a href=\"http:\/\/hightopo.com\" name=\"hightopo\" target=\"_blank\" title=\"hightopo\">hightopo<\/a> \u6765\u5b9e\u73b0\u4e00\u6b3e\u7f51\u9875\u7248\u7684\u7f51\u7edc\u62d3\u6251\u56fe\u3002\n<\/p>\n<p>\n\t\u5728\u5b9e\u73b0\u7f51\u7edc\u62d3\u6251\u56fe\u4e4b\u524d\uff0c\u6211\u4eec\u5148\u6765\u770b\u4e00\u4e0b\uff0c\u6700\u7ec8\u5b9e\u73b0\u7684\u6548\u679c\uff1a\n<\/p>\n<p>\n\t<img decoding=\"async\" alt=\"hightopo \u7f51\u7edc\u62d3\u6251\u56fe\" src=\"http:\/\/ocuzluml6.bkt.clouddn.com\/h5canvas.gif\" \/>\n<\/p>\n<p>\n\t\u5f15\u5165\u6587\u4ef6\u540e\uff0c\u4e3b\u8981\u5b9e\u73b0\u4ee3\u7801\u5982\u4e0b\uff1a\n<\/p>\n<pre class=\"brush:jscript;\">\r\nvar line = createNode();\/\/\u521b\u5efa\u4e00\u4e2a\u8282\u70b9\r\nline.setSize(725, 20);\/\/\u8bbe\u7f6e\u8282\u70b9\u5927\u5c0f\r\nline.setPosition(310, 325);\/\/\u8bbe\u7f6e\u8282\u70b9\u4f4d\u7f6e\r\nline.s({\/\/\u8bbe\u7f6e\u8282\u70b9\u7684style\u5c5e\u6027\r\n    &#039;shape&#039;: &#039;roundRect&#039;,\/\/\u51b3\u5b9ashape\u7684\u5f62\u72b6\uff0c\u9ed8\u8ba4\u503c\u4e3a\u7a7a\uff0c\u4ee3\u8868\u7528image\u7ed8\u5236\u3002roundRect\u56db\u5468\u5706\u89d2\u77e9\u5f62\r\n    &#039;shape.background&#039;: &#039;rgba(14,36,117,0.80)&#039;,\/\/\u80cc\u666f\u586b\u5145\u989c\u8272\uff0c\u4e3anull\u4ee3\u8868\u4e0d\u586b\u5145\u80cc\u666f\r\n    &#039;shape.border.color&#039;: &#039;#979797&#039;,\/\/\u8fb9\u6846\u989c\u8272\r\n\t\/\/\u8be5\u53c2\u6570\u6307\u5b9aroundRect\u7c7b\u578b\u7684\u5706\u89d2\u534a\u5f84\uff0c\u9ed8\u8ba4\u4e3a\u7a7a\u7cfb\u7edf\u81ea\u52a8\u8c03\u8282\uff0c\u53ef\u8bbe\u7f6e\u6b63\u6570\u503c\r\n    &#039;shape.corner.radius&#039;: 10,\r\n    &#039;label&#039;: &#039;\u5185\u90e8\u7f51\u7edc\u4ea4\u6362\u673a&#039;, \/\/\u6587\u5b57\u5185\u5bb9\uff0c\u9ed8\u8ba4\u4e3a\u7a7a\r\n    &#039;label.position&#039;: 45,\/\/\u6587\u5b57\u5185\u5bb9\uff0c\u9ed8\u8ba4\u4e3a\u7a7a\r\n    &#039;label.offset.x&#039;: 50,\/\/\u6587\u5b57\u6c34\u5e73\u504f\u79fb\uff0c\u5bf9\u4e8eEdge\u610f\u5473\u7740\u6cbf\u7740\u8fde\u7ebf\u65b9\u5411\u6c34\u5e73\u504f\u79fb\r\n\t\/\/HT\u9ed8\u8ba4\u9664\u4e86label.*\u7684\u5c5e\u6027\u5916\uff0c\u8fd8\u63d0\u4f9b\u4e86label2.*\u7684\u5c5e\u6027\uff0c\u7528\u4e8e\u6ee1\u8db3\u4e00\u4e2a\u56fe\u5143\u9700\u8981\u663e\u793a\u53cc\u6587\u5b57\u7684\u60c5\u51b5\r\n    &#039;label2&#039;: &#039;\u5185\u90e8\u7f51\u7edc\u4ea4\u6362\u673a&#039;,\r\n    &#039;label2.position&#039;: 48,\r\n    &#039;label2.offset.x&#039;: 50,\r\n    &#039;label2.offset.y&#039;: 2,\r\n});\r\ncreateEdge(line, createNode(&#039;images\/\u7535\u8111.json&#039;, cabinet, 185, 450), &#039;rgb(30,232,178)&#039;, -100, true);\r\n\/\/\u53c2\u65701 \u6e90\u8282\u70b9\uff0c\u53c2\u65702 \u7ec8\u8282\u70b9\uff0c\u53c2\u65703 \u8fde\u7ebf\u989c\u8272\uff0c\u53c2\u65704 \u8fde\u7ebf\u8d77\u59cb\u70b9\u7684\u6c34\u5e73\u504f\u79fb\uff0c\u53c2\u65705 \u662f\u5426\u521b\u5efa\u4e24\u6761\u8fde\u7ebf\r\nvar exchange = createNode(&#039;images\/\u4ea4\u6362\u673a.json&#039;, null, -53, 313);\r\nexchange.setHost(line);\/\/\u8bbe\u7f6e\u5438\u9644\r\nline.setHost(exchange);\/\/\u53cd\u5438\u9644 \u53c8\u8bbe\u7f6eline\u7684\u5438\u9644\u4e3aexchange\r\ndataModel.setAutoAdjustIndex(false);\/\/\u5c06\u81ea\u52a8\u8c03\u6574data\u5728\u5bb9\u5668\u4e2d\u7d22\u5f15\u987a\u5e8f\u7684\u5f00\u5173\u5173\u95ed\r\ndataModel.sendToTop(exchange);\/\/\u5c06data\u5728\u62d3\u6251\u4e0a\u7f6e\u9876\r\nfunction createGroup(name, x, y) {\r\n\t\/\/\u7ec4\u7c7b\u578b \u5b9e\u9645\u4e0a\u4e5f\u662f\u4e00\u4e2a\u8282\u70b9\r\n    var group = new ht.Group();\r\n\t\/\/\u8bbe\u7f6e\u5c55\u5f00\u7ec4\r\n    group.setExpanded(true);\r\n    group.setName(name);\/\/\u8bbe\u7f6e\u7ec4\u7684\u540d\u5b57\r\n    group.s({\/\/\u8bbe\u7f6e\u7ec4\u7684\u6837\u5f0fstyle\r\n\t\t\/\/\u7ec4\u5c55\u5f00\u540e\u7684title\u80cc\u666f\u989c\u8272\uff0c\u4ec5\u5bf9group.type\u4e3a\u7a7a\u7684\u7c7b\u578b\u8d77\u4f5c\u7528\r\n        &#039;group.title.background&#039;: &#039;rgba(14,36,117,0.80)&#039;,\r\n\t\t\/\/\u7ec4\u5c55\u5f00\u540e\u7684\u80cc\u666f\u989c\u8272\r\n        &#039;group.background&#039;: &#039;rgba(14,36,117,0.40)&#039;,\r\n\t\t\/\/\u7ec4\u5c55\u5f00\u540e\u7684title\u6587\u5b57\u6c34\u5e73\u5bf9\u9f50\u65b9\u5f0f\uff0c\u9ed8\u8ba4\u503c\u4e3a&#039;left&#039;\uff0c\u53ef\u8bbe\u7f6e\u4e3acenter\u548cright\r\n        &#039;group.title.align&#039;: &#039;center&#039;\r\n    });\r\n    group.setPosition(x, y);\/\/\u8bbe\u7f6e\u7ec4\u7684\u4f4d\u7f6e\r\n\t\/\/\u8bbe\u7f6e\u62d3\u6251\u4e0a\u5c55\u73b0\u7684\u56fe\u7247\u4fe1\u606f\uff0c\u5728GraphView\u62d3\u6251\u56fe\u4e2d\u56fe\u7247\u4e00\u822c\u4ee5position\u4e3a\u4e2d\u5fc3\u7ed8\u5236\r\n    group.setImage(&#039;images\/\u670d\u52a1\u5668.json&#039;);\r\n    dataModel.add(group);\/\/\u5c06\u521b\u5efa\u7684\u7ec4\u8282\u70b9\u6dfb\u52a0\u8fdb\u6570\u636e\u5bb9\u5668\u4e2d\r\n\t\/\/www.xttblog.com\r\n    return group;\r\n}\r\nfunction createNode(image, parent, x, y) {\r\n    var node = new ht.Node();\/\/\u521b\u5efa\u4e00\u4e2a Node \u8282\u70b9\r\n    if (image) node.setImage(image);\/\/\u8bbe\u7f6e\u8282\u70b9\u7684\u663e\u793a\u56fe\u7247\r\n    if (parent) node.setParent(parent);\/\/\u8bbe\u7f6e\u8282\u70b9\u7684\u7236\u4eb2\r\n    if (x &amp;&amp; y) node.setPosition(x, y);\/\/\u8bbe\u7f6e\u8282\u70b9\u7684\u4f4d\u7f6e\r\n    dataModel.add(node);\/\/\u5c06\u8282\u70b9\u6dfb\u52a0\u8fdb\u6570\u636e\u5bb9\u5668\u4e2d\r\n\t\/\/\u4e1a\u4f59\u8349\uff1awww.xttblog.com\r\n    return node;\r\n}<\/pre>\n<p>\n\t\u66f4\u591a\u4f7f\u7528\u6848\u4f8b\u548c\u6559\u7a0b\uff0c\u8bf7\u767b\u5f55<a href=\"http:\/\/hightopo.com\/demos\/index.html\" name=\"hightopo\" target=\"_blank\" title=\"hightopo\">http:\/\/hightopo.com\/demos\/index.html<\/a>\u67e5\u770b\u3002<\/p>\n<!-- <audio autoplay=\"autoplay\" height=\"100\" width=\"100\" hidden=\"true\"><source src=\"https:\/\/c.coka.la\/orAvPR.mp3\" type=\"audio\/mp3\"\/><\/audio><img decoding=\"async\" src=\"https:\/\/images.weserv.nl\/?url=https:\/\/ws3.sinaimg.cn\/large\/8fa5dcfcgy1g4em3rzar5j20ib089ae0.jpg\" alt=\"\u4e1a\u4f59\u8349\u516c\u4f17\u53f7\"\/> --><p><!-- <img decoding=\"async\" src=\"https:\/\/raw.githubusercontent.com\/xmt1139057136\/xttblog\/master\/8fa5dcfcgy1g4em3rzar5j20ib089ae0.jpg\" alt=\"\u4e1a\u4f59\u8349\u516c\u4f17\u53f7\"\/>--><img decoding=\"async\" src=\"https:\/\/saas.51autoparts.cn\/api\/admin\/sys-file\/oss\/file?fileName=84db51f8561e448f9a4fda2eff0811f9.jpg\" alt=\"\u4e1a\u4f59\u8349\u516c\u4f17\u53f7\"\/><\/p><p>\u6700\u540e\uff0c\u6b22\u8fce\u5173\u6ce8\u6211\u7684\u4e2a\u4eba\u5fae\u4fe1\u516c\u4f17\u53f7\uff1a\u4e1a\u4f59\u8349\uff08yyucao\uff09\uff01<b>\u53ef\u52a0\u4f5c\u8005\u5fae\u4fe1\u53f7\uff1a<font color=\"red\">xttblog2<\/font>\u3002\u5907\u6ce8\uff1a\u201c1\u201d\uff0c\u6dfb\u52a0\u535a\u4e3b\u5fae\u4fe1\u62c9\u4f60\u8fdb\u5fae\u4fe1\u7fa4\u3002\u5907\u6ce8\u9519\u8bef\u4e0d\u4f1a\u540c\u610f\u597d\u53cb\u7533\u8bf7\u3002<\/b>\u518d\u6b21\u611f\u8c22\u60a8\u7684\u5173\u6ce8\uff01\u540e\u7eed\u6709\u7cbe\u5f69\u5185\u5bb9\u4f1a\u7b2c\u4e00\u65f6\u95f4\u53d1\u7ed9\u60a8\uff01\u539f\u521b\u6587\u7ae0\u6295\u7a3f\u8bf7\u53d1\u9001\u81f3532009913@qq.com\u90ae\u7bb1\u3002\u5546\u52a1\u5408\u4f5c\u4e5f\u53ef\u6dfb\u52a0\u4f5c\u8005\u5fae\u4fe1\u8fdb\u884c\u8054\u7cfb\uff01<\/p><p>\u672c\u6587\u539f\u6587\u51fa\u5904\uff1a<a href=\"https:\/\/www.xttblog.com\">\u4e1a\u4f59\u8349<\/a>\uff1a &raquo; <a href=\"https:\/\/www.xttblog.com\/?p=2475\">\u4f7f\u7528 hightopo \u5b9e\u73b0web\u7248\u7f51\u7edc\u62d3\u6251\u56fe<\/a><\/p><!-- <div class=\"bd-reward-stl\"><button id=\"bdRewardBtn\"><span><\/span><\/button><\/div> -->","protected":false},"excerpt":{"rendered":"<p>hightopo \u662f\u4e00\u6b3e\u6536\u8d39\u8f6f\u4ef6\uff0c\u5b83\u53ef\u4ee5\u5f88\u65b9\u4fbf\u7684\u5e2e\u52a9\u6211\u4eec\u5236\u4f5cweb\u7248\u7684\u7f51\u7edc\u62d3\u6251\u56fe\u3002\u5b83\u7684\u5e95\u5c42\u662f HTML5 \u7684  [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[31,1600,119,131,133],"class_list":["post-2475","post","type-post","status-publish","format-standard","hentry","category-html5","tag-canvas","tag-hightopo","tag-html5","tag-jtopo","tag-133"],"_links":{"self":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/2475","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2475"}],"version-history":[{"count":1,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/2475\/revisions"}],"predecessor-version":[{"id":2476,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/2475\/revisions\/2476"}],"wp:attachment":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2475"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2475"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2475"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}