Просмотр исходного кода

pre最大高度800px 规范目录添加

haojianlong 4 лет назад
Родитель
Сommit
da10b74965

+ 2 - 0
docs/.vuepress/components/scene/items/ClockItem.vue

@@ -97,6 +97,8 @@
             this.drawHour(painter, t.getHours(), t.getMinutes(), t.getSeconds());
             this.drawMinute(painter, t.getMinutes(), t.getSeconds());
             this.drawSecond(painter, t.getSeconds() + t.getMilliseconds() / 1000.0);
+
+            this.update()
         } // Function onDraw()
 
         /**

+ 3 - 3
docs/.vuepress/components/scene/items/rect.vue

@@ -10,7 +10,7 @@
     import {SGraphScene, SGraphShape, SGraphView} from "@persagy-web/graph/lib";
     import {SRect} from "@persagy-web/draw/lib";
 
-    class rect extends SGraphShape{
+    class Rect extends SGraphShape{
         constructor(parent, data) {
             super(parent, data.Style);
             this.leftTopX = data.X;
@@ -95,11 +95,11 @@
                 this.view = new SGraphView('rect');
                 const scene = new SGraphScene();
 
-                this.item = new rect(null, this.rectData);
+                this.item = new Rect(null, this.rectData);
                 this.item.selectable = true;
                 scene.addItem(this.item);
 
-                this.item2 = new rect(null, this.rectData2);
+                this.item2 = new Rect(null, this.rectData2);
                 this.item2.selectable = true;
                 scene.addItem(this.item2);
 

+ 3 - 3
docs/.vuepress/components/scene/items/roundRect.vue

@@ -9,7 +9,7 @@
   import {SGraphScene, SGraphShape, SGraphView} from '@persagy-web/graph/lib'
   import {SRect} from '@persagy-web/draw/lib'
 
-  class roundRect extends SGraphShape {
+  class RoundRect extends SGraphShape {
     constructor(parent, data) {
       super(parent, data.Style);
       this.leftTopX = data.X;
@@ -100,11 +100,11 @@
         this.view = new SGraphView('roundRect');
         const scene = new SGraphScene();
 
-        this.item = new roundRect(null, this.rectData);
+        this.item = new RoundRect(null, this.rectData);
         this.item.selectable = true;
         scene.addItem(this.item);
 
-        this.item2 = new roundRect(null, this.rectData2);
+        this.item2 = new RoundRect(null, this.rectData2);
         this.item2.selectable = true;
         scene.addItem(this.item2);
 

+ 1 - 0
docs/.vuepress/config.js

@@ -72,6 +72,7 @@ module.exports = {
                         text: "引擎",
                         items: [
                             {text: "数据格式", link: "/guides/format/floorMap.md"},
+                            {text: "开发规范", link: "/guides/standard/"},
                             {text: "图形引擎", link: "/guides/engine/"},
                             {text: "场景管理", link: "/guides/scene/"},
                             {text: "楼层平面图", link: "/guides/big/"},

+ 3 - 0
docs/.vuepress/styles/palette.styl

@@ -19,3 +19,6 @@ canvas:focus{
 .el-table__body, .el-table__footer, .el-table__header{
   margin:0;
 }
+pre {
+  max-height: 800px;
+}

+ 2 - 2
docs/guides/engine/composite.md

@@ -4,11 +4,11 @@
 [[toc]]
 :::
 
-通过canvas的属性globalCompositeOperation,设置多个图形之间的绘制方式
+通过``` canvas ```的属性``` globalCompositeOperation ```,设置多个图形之间的绘制方式
 
 源图像 = 您打算放置到画布上的绘图。
 
-目标图像 = 您已经放置在画布上的绘图
+目标图像 = 您已经放置在画布上的绘图
 
 <engine-composite /> 
 

+ 2 - 2
docs/guides/engine/gradient.md

@@ -91,8 +91,8 @@
 
 ## 渐变属性
 
-起点:渐变开始位置
-stop停点:渐变过程中间色,可以有多个
+起点:渐变开始位置 <br />
+```stop ```停点:渐变过程中间色,可以有多个 <br />
 结束点:渐变结束位置
 
 ![渐变属性1](./img/gradient-attr1.png)

+ 0 - 2
docs/guides/index.js

@@ -46,8 +46,6 @@ const content = [
                 title: "综合示例",
                 children: [
                     ["/guides/scene/items/clock", "时钟"],
-                    ["/guides/scene/undo", "Undo示例"],
-                    ["/guides/scene/align", "对齐示例"],
                     ["/guides/scene/regularPolygon", "正多边形"],
                     ["/guides/scene/star", "星形"],
                 ]

+ 1 - 1
docs/guides/scene/README.md

@@ -1,4 +1,4 @@
-场景管理
+# 场景管理
 
 ::: details 目录
 [[toc]]

+ 5 - 0
docs/guides/standard/README.md

@@ -0,0 +1,5 @@
+# 开发规范
+
+### [typescript 编写规范](./typescript.md)
+
+### [javascript 编写规范](./javascript.md)

+ 3 - 0
docs/guides/standard/javascript.md

@@ -0,0 +1,3 @@
+# javascript 编写规范
+
+[返回规范总览](./README.md)

+ 3 - 0
docs/guides/standard/typescript.md

@@ -0,0 +1,3 @@
+# typescript 编写规范
+
+[返回规范总览](./README.md)