Forráskód Böngészése

数据格式小写

haojianlong 4 éve
szülő
commit
6a93e4cfeb

+ 21 - 21
docs/.vuepress/components/engine/selectContainer.vue

@@ -22,29 +22,29 @@
         id: string = uuid();
         view: SGraphView | undefined;
         rectData = {
-            X: 0,
-            Y: 0,
-            Width: 500,
-            Height: 500,
-            Radius: 0,
-            Style: {
-                "Default":{
-                    "Stroke": "#cccccc",
-                    "Fill": "SLinearGradient{0,0;0,1000;0,#ff483bff;0.5,#04ff00ff;1,#3d4effff;}",
-                    "LineWidth": 2,
-                    "Effect": {}
+            x: 0,
+            y: 0,
+            width: 500,
+            height: 500,
+            radius: 0,
+            style: {
+                "default":{
+                    "stroke": "#cccccc",
+                    "fill": "SLinearGradient{0,0;0,1000;0,#ff483bff;0.5,#04ff00ff;1,#3d4effff;}",
+                    "lineWidth": 2,
+                    "effect": {}
                 },
-                "Selected": {
-                    "Stroke": "#66ff66",
-                    "Fill": "SRadialGradient{500,500,50;500,500,500;0,#ff483bff;0.5,#04ff00ff;1,#3d4effff;}",
-                    "LineWidth": 3,
-                    "Effect": {}
+                "selected": {
+                    "stroke": "#66ff66",
+                    "fill": "SRadialGradient{500,500,50;500,500,500;0,#ff483bff;0.5,#04ff00ff;1,#3d4effff;}",
+                    "lineWidth": 3,
+                    "effect": {}
                 },
-                "Disabled": {
-                    "Stroke": "#333333",
-                    "Fill": "#afafaf",
-                    "LineWidth": 1,
-                    "Effect": {}
+                "disabled": {
+                    "stroke": "#333333",
+                    "fill": "#afafaf",
+                    "lineWidth": 1,
+                    "effect": {}
                 },
             }
         };

+ 1 - 1
docs/.vuepress/components/scene/items/ImageItem.vue

@@ -24,7 +24,7 @@
     }
 
     @Component
-    export default class ZoneCanvas extends Vue {
+    export default class imageCanvas extends Vue {
         id: string = uuid();
         url: string = require('./1.jpg');
         mounted() {

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

@@ -39,6 +39,8 @@ class SScene extends SGraphScene {
     this.textItem.moveable = true;
     this.textItem.x = 100;
     this.textItem.y = 100;
+      this.textItem.selectable = true
+
     this.addItem(this.textItem);
     this.textItem.connect("onMove", this, this.onItemMove.bind(this));
   }

+ 21 - 20
docs/.vuepress/components/scene/items/area.vue

@@ -14,33 +14,33 @@
         id: string = uuid();
         view: SGraphView | undefined;
         areaData = {
-            Outline: [
+            outline: [
                 [
-                    [{X:0,Y:0},{X:0,Y:1000},{X:1000,Y:1000},{X:1000,Y:0}],
-                    [{X:200,Y:200},{X:800,Y:200},{X:800,Y:800},{X:200,Y:800}]
+                    [{x:0,y:0},{x:0,y:1000},{x:1000,y:1000},{x:1000,y:0}],
+                    [{x:200,y:200},{x:800,y:200},{x:800,y:800},{x:200,y:800}]
                 ],
                 [
-                    [{X:1000,Y:1000},{X:1200,Y:1000},{X:1200,Y:1200},{X:1000,Y:1200}]
+                    [{x:1000,y:1000},{x:1200,y:1000},{x:1200,y:1200},{x:1000,y:1200}]
                 ]
             ],
-            Style: {
-                "Default":{
-                    "Stroke": "#cccccc",
-                    "Fill": "SLinearGradient{0,0;0,1200;0,#ff483bff;0.5,#04ff00ff;1,#3d4effff;}",
-                    "LineWidth": 2,
-                    "Effect": {}
+            style: {
+                "default":{
+                    "stroke": "#cccccc",
+                    "fill": "SLinearGradient{0,0;0,1200;0,#ff483bff;0.5,#04ff00ff;1,#3d4effff;}",
+                    "lineWidth": 2,
+                    "effect": {}
                 },
-                "Selected": {
-                    "Stroke": "#66ff66",
-                    "Fill": "SRadialGradient{500,500,50;500,500,800;0,#ff483bff;0.5,#04ff00ff;1,#3d4effff;}",
-                    "LineWidth": 3,
-                    "Effect": {}
+                "selected": {
+                    "stroke": "#66ff66",
+                    "fill": "SRadialGradient{500,500,50;500,500,800;0,#ff483bff;0.5,#04ff00ff;1,#3d4effff;}",
+                    "lineWidth": 3,
+                    "effect": {}
                 },
-                "Disabled": {
-                    "Stroke": "#333333",
-                    "Fill": "#afafaf",
-                    "LineWidth": 1,
-                    "Effect": {}
+                "disabled": {
+                    "stroke": "#333333",
+                    "fill": "#afafaf",
+                    "lineWidth": 1,
+                    "effect": {}
                 },
             }
         };
@@ -53,6 +53,7 @@
             const scene = new SGraphScene();
             const item = new SGraphAreaGroupItem(null, this.areaData);
             item.selectable = true;
+            item._resizeable = false;
             scene.addItem(item);
             this.view.scene = scene;
             this.view.fitSceneToView();

+ 19 - 19
docs/.vuepress/components/scene/items/polygon.vue

@@ -36,28 +36,28 @@
         item: Expolygon | undefined;
         id: string = uuid();
         rectData = {
-            Outline: [
-                [{X:0,Y:0},{X:0,Y:1000},{X:700,Y:1500},{X:500,Y:1000},{X:200,Y:0}],
-                [{X:1000,Y:1000},{X:1200,Y:1000},{X:1200,Y:1200},{X:1000,Y:1200}]
+            outline: [
+                [{x:0,y:0},{x:0,y:1000},{x:700,y:1500},{x:500,y:1000},{x:200,y:0}],
+                [{x:1000,y:1000},{x:1200,y:1000},{x:1200,y:1200},{x:1000,y:1200}]
             ],
-            Style: {
-                "Default":{
-                    "Stroke": "#cccccc",
-                    "Fill": "SLinearGradient{0,0;0,1000;0,#ff483bff;0.5,#04ff00ff;1,#3d4effff;}",
-                    "LineWidth": 2,
-                    "Effect": {}
+            style: {
+                "default":{
+                    "stroke": "#cccccc",
+                    "fill": "SLinearGradient{0,0;0,1000;0,#ff483bff;0.5,#04ff00ff;1,#3d4effff;}",
+                    "lineWidth": 2,
+                    "effect": {}
                 },
-                "Selected": {
-                    "Stroke": "#66ff66",
-                    "Fill": "SRadialGradient{500,500,50;500,500,500;0,#ff483bff;0.5,#04ff00ff;1,#3d4effff;}",
-                    "LineWidth": 3,
-                    "Effect": {}
+                "selected": {
+                    "stroke": "#66ff66",
+                    "fill": "SRadialGradient{500,500,50;500,500,500;0,#ff483bff;0.5,#04ff00ff;1,#3d4effff;}",
+                    "lineWidth": 3,
+                    "effect": {}
                 },
-                "Disabled": {
-                    "Stroke": "#333333",
-                    "Fill": "#afafaf",
-                    "LineWidth": 1,
-                    "Effect": {}
+                "disabled": {
+                    "stroke": "#333333",
+                    "fill": "#afafaf",
+                    "lineWidth": 1,
+                    "effect": {}
                 },
             }
         };

+ 44 - 42
docs/.vuepress/components/scene/items/rect.vue

@@ -19,56 +19,56 @@
         item2: SGraphRectItem | undefined;
         R: number = 0;
         rectData = {
-            X: 0,
-            Y: 0,
-            Width: 500,
-            Height: 500,
-            Radius: 0,
-            Style: {
-                "Default":{
-                    "Stroke": "#cccccc",
-                    "Fill": "SLinearGradient{0,0;0,1000;0,#ff483bff;0.5,#04ff00ff;1,#3d4effff;}",
-                    "LineWidth": 2,
-                    "Effect": {}
+            x: 0,
+            y: 0,
+            width: 500,
+            height: 500,
+            radius: 0,
+            style: {
+                "default":{
+                    "stroke": "#cccccc",
+                    "fill": "SLinearGradient{0,0;0,1000;0,#ff483bff;0.5,#04ff00ff;1,#3d4effff;}",
+                    "lineWidth": 2,
+                    "effect": {}
                 },
-                "Selected": {
-                    "Stroke": "#66ff66",
-                    "Fill": "SRadialGradient{500,500,50;500,500,500;0,#ff483bff;0.5,#04ff00ff;1,#3d4effff;}",
-                    "LineWidth": 3,
-                    "Effect": {}
+                "selected": {
+                    "stroke": "#66ff66",
+                    "fill": "SRadialGradient{500,500,50;500,500,500;0,#ff483bff;0.5,#04ff00ff;1,#3d4effff;}",
+                    "lineWidth": 3,
+                    "effect": {}
                 },
-                "Disabled": {
-                    "Stroke": "#333333",
-                    "Fill": "#afafaf",
-                    "LineWidth": 1,
-                    "Effect": {}
+                "disabled": {
+                    "stroke": "#333333",
+                    "fill": "#afafaf",
+                    "lineWidth": 1,
+                    "effect": {}
                 },
             }
         };
         rectData2 = {
-            X: 1000,
-            Y: 0,
-            Width: 500,
-            Height: 500,
-            Radius: 0,
-            Style: {
-                "Default":{
-                    "Stroke": "#cccccc",
-                    "Fill": "#ffccee",
-                    "LineWidth": 2,
-                    "Effect": {}
+            x: 1000,
+            y: 0,
+            width: 500,
+            height: 500,
+            radius: 0,
+            style: {
+                "default":{
+                    "stroke": "#cccccc",
+                    "fill": "#ffccee",
+                    "lineWidth": 2,
+                    "effect": {}
                 },
-                "Selected": {
-                    "Stroke": "#66ff66",
-                    "Fill": "#ff33ee",
-                    "LineWidth": 3,
-                    "Effect": {}
+                "selected": {
+                    "stroke": "#66ff66",
+                    "fill": "#ff33ee",
+                    "lineWidth": 3,
+                    "effect": {}
                 },
-                "Disabled": {
-                    "Stroke": "#333333",
-                    "Fill": "#afafaf",
-                    "LineWidth": 1,
-                    "Effect": {}
+                "disabled": {
+                    "stroke": "#333333",
+                    "fill": "#afafaf",
+                    "lineWidth": 1,
+                    "effect": {}
                 },
             }
         };
@@ -80,10 +80,12 @@
             const scene = new SGraphScene();
             this.item = new SGraphRectItem(null, this.rectData);
             this.item.selectable = true;
+            this.item._resizeable = false;
             scene.addItem(this.item);
 
             this.item2 = new SGraphRectItem(null, this.rectData2);
             this.item2.selectable = true;
+            this.item2._resizeable = false;
             scene.addItem(this.item2);
 
             this.view.scene = scene;

+ 17 - 17
docs/guides/format/style.md

@@ -8,23 +8,23 @@
 
 ``` json
 {
-    "Default":{
-        "Stroke": "SColor",
-        "Fill": "SColor | Gradient",
-        "LineWidth": "number",
-        "Effect": {}
+    "default":{
+        "stroke": "SColor",
+        "fill": "SColor | Gradient",
+        "lineWidth": "number",
+        "effect": {}
     },
-    "Selected": {
-        "Stroke": "SColor",
-        "Fill": "SColor | Gradient",
-        "LineWidth": "number",
-        "Effect": {}
+    "selected": {
+        "stroke": "SColor",
+        "fill": "SColor | Gradient",
+        "lineWidth": "number",
+        "effect": {}
     },
-    "Disabled": {
-        "Stroke": "SColor",
-        "Fill": "SColor | Gradient",
-        "LineWidth": "number",
-        "Effect": {}
+    "disabled": {
+        "stroke": "SColor",
+        "fill": "SColor | Gradient",
+        "lineWidth": "number",
+        "effect": {}
     },
 }
 ```
@@ -34,7 +34,7 @@
 
 2.如果需要其他状态的风格, 则需要在 item 中添加对应状态, 并在绘制时确定 item 当前处于何种状态, 同时风格数据中增加对应的状态及风格
 
-3.<font color="red"> Stroke </font> 为线条颜色, 其值为16进制的颜色字符串, 目前只支持6位和8位颜色字符串, 该字符串的生成方式,
+3.<font color="red"> stroke </font> 为线条颜色, 其值为16进制的颜色字符串, 目前只支持6位和8位颜色字符串, 该字符串的生成方式,
   调用引擎中``` SColor ```类型中``` toVal() ```方法可生成6位16进制颜色; 调用<font color="red"> value </font>属性可得到8位16进制颜色
   
 4.<font face="黑体" color="red"> Fill </font> 为渐变时, 其值为描述渐变的字符串,如
@@ -42,7 +42,7 @@
     ```'SRadialGradient{500,500,50;500,500,500;0,#ff483bff;0.5,#04ff00ff;1,#3d4effff;}' ```该字符串生成方式, 调用``` SGradient ```类型的``` value() ```方法即可生成;格式严格遵循示例,尽量不要手动拼接;
   <br /><font face="黑体" color="red"> Fill </font> 为普通颜色时, 其值与 <font face="黑体" color="red"> Stroke </font> 一致
   
-5.<font face="黑体" color="red"> LineWidth </font> 为线条宽度, 数字类型
+5.<font face="黑体" color="red"> lineWidth </font> 为线条宽度, 数字类型
 
 6.详情使用方式,参阅 [场景管理- item 示例-矩形](../scene/items/rect.md)
 

+ 59 - 59
docs/guides/format/systemJson.md

@@ -8,66 +8,66 @@
 
 ``` json5
 {
-    Data:[
+    data:[
         {
           
-            Elements:{                          // 系统图展示所需数据
-                Nodes:[],                       // 图例节点,所有与工程信息化相关的图例(图标类型与区域)
-                Markers:[],                     // 与工程信息无关的标识对象(增加文本注释,图上的图片说明)
-                Relations:[],                   // 管线对象
+            elements:{                          // 系统图展示所需数据
+                nodes:[],                       // 图例节点,所有与工程信息化相关的图例(图标类型与区域)
+                markers:[],                     // 与工程信息无关的标识对象(增加文本注释,图上的图片说明)
+                relations:[],                   // 管线对象
             },
-            ID: '',                             // 图ID
-            Name: '',                           // 名称
-            CategoryID: '',                     // 图分类ID
-            ProjectID: '',                      // 项目ID
-            BuildingID: '',                     // 建筑ID
-            FloorID: '',                        // 楼层id
-            Note: '',                           // 图说明
-            Log: {                              // 图操作日志
-                  Mark:'',                      // 图的存盘标记
-                  CommandList:[
+            id: '',                             // 图ID
+            name: '',                           // 名称
+            categoryID: '',                     // 图分类ID
+            projectID: '',                      // 项目ID
+            buildingID: '',                     // 建筑ID
+            floorID: '',                        // 楼层id
+            note: '',                           // 图说明
+            log: {                              // 图操作日志
+                  mark:'',                      // 图的存盘标记
+                  commandList:[
                    {
-                        Command: '',            // 命令
-                        Desc: '',               // 描述
-                        Detail: ''              // 详情
+                        command: '',            // 命令
+                        desc: '',               // 描述
+                        detail: ''              // 详情
                     }
                 ]
             }
         }
     ],
-    Message: '',
-    Result: ''
+    message: '',
+    result: ''
 }
 ```
 
 ## 图例节点
 
 ``` json5
-    Nodes:[
+    nodes:[
         {   
-            ID: '',                             // ID
-            Name: '',                           // 名称
-            AttachObjectIds:[],                 // 返回工程信息化对象 ID 列表
-            GraphElementType: '',               // 图例类型 None/Line/Zone/Image:非图例/线条/区域类型/图标
-            GraphElementId: '',                 // 对应的图元ID
-            Num: 1                              // 图例数量
-            Type: '',                           // 节点类型(image / zone)
-            Pos: {X: 0, Y: 0},                  // 位置
-            Scale: {X: 1, Y: 1, Z: 1},          // 缩放
-            Rotate: {X: 0, Y: 0, Z: 0},         // 旋转
-            Size: {Width:0, Height: 0},         // 大小
-            AnchorList:[
+            id: '',                             // ID
+            name: '',                           // 名称
+            attachObjectIds:[],                 // 返回工程信息化对象 ID 列表
+            graphElementType: '',               // 图例类型 None/Line/Zone/Image:非图例/线条/区域类型/图标
+            graphElementId: '',                 // 对应的图元ID
+            num: 1                              // 图例数量
+            type: '',                           // 节点类型(image / zone)
+            pos: {x: 0, y: 0},                  // 位置
+            scale: {x: 1, y: 1, Z: 1},          // 缩放
+            rotate: {x: 0, y: 0, Z: 0},         // 旋转
+            size: {width:0, height: 0},         // 大小
+            anchorList:[
                     {
-                        ID: '',                 // 锚点ID
-                        Pos: {X: 0, Y: 0},      // 锚点的坐标
+                        id: '',                 // 锚点ID
+                        pos: {x: 0, y: 0},      // 锚点的坐标
                     },
                     ...
                 ],
-            OutLine: [
-                [{X:0,Y:0,Z:0},...],            // 外轮廓 
+            outline: [
+                [{x:0,y:0,z:0},...],            // 外轮廓 
                 ...                             // 内轮廓
             ],                                  // 轮廓线
-            Properties: {}                      // 由应用自己定义
+            properties: {}                      // 由应用自己定义
         },
         ...
     ]
@@ -76,16 +76,16 @@
 ## 标识对象
 
 ``` json5
-    Markers:[
+    markers:[
         {
-            ID: '',                             // ID
-            Name: '',                           // 名称
-            Type: '',                           // 图标(Image),线类型(Line),文本(Text)
-            Pos: {X: 0, y: 0},                  // 位置
-            Scale: {X: 1, Y: 1, Z: 1},          // 缩放
-            Rotate: {X: 0, Y: 0, Z: 0},         // 旋转
-            Size: {Width: 0, Height: 0},        // 大小
-            Properties: {}                      // 由应用自己定义
+            id: '',                             // ID
+            name: '',                           // 名称
+            type: '',                           // 图标(Image),线类型(Line),文本(Text)
+            pos: {x: 0, y: 0},                  // 位置
+            scale: {x: 1, y: 1, z: 1},          // 缩放
+            rotate: {x: 0, y: 0, z: 0},         // 旋转
+            size: {width: 0, height: 0},        // 大小
+            properties: {}                      // 由应用自己定义
         },
         ...
     ]
@@ -94,19 +94,19 @@
 ## 对象关系
 
 ``` json5
-    Relations: [
+    relations: [
         {
-            ID: '',                             // ID
-            Name: '',                           // 名称
-            GraphElementId: '',                 // 对应的图元ID
-            Node1ID: '',                        // 关联节点1_id
-            Node2ID: '',                        // 关联节点2_id
-            Anchor1ID: '',                      // 关联锚点1_id
-            Anchor2ID: '',                      // 关联锚点2_id
-            Dir: 0,                             // 方向(0:无向,1:节点1到节点2,2:节点2到节点1)
-            LineType: '',                       // 直线(Line),水平垂直
-            PointList: [{X:0,Y:0,Z:0},...],     // 线的顶点坐标
-            Style: {}                           // 线的绘图样式
+            id: '',                             // ID
+            name: '',                           // 名称
+            graphElementId: '',                 // 对应的图元ID
+            node1Id: '',                        // 关联节点1_id
+            node2Id: '',                        // 关联节点2_id
+            anchor1Id: '',                      // 关联锚点1_id
+            anchor2Id: '',                      // 关联锚点2_id
+            dir: 0,                             // 方向(0:无向,1:节点1到节点2,2:节点2到节点1)
+            lineType: '',                       // 直线(Line),水平垂直
+            pointList: [{x:0,y:0,z:0},...],     // 线的顶点坐标
+            style: {}                           // 线的绘图样式
         },
         ...
     ]

+ 21 - 21
docs/guides/scene/items/rect.md

@@ -14,34 +14,34 @@
 示例中展示了 一种渐变风格的 json 传参
 
 ``` json
-"Default":{
-    "Stroke": "#cccccc",
-    "Fill": "SLinearGradient{0,0;0,1000;0,#ff483bff;0.5,#04ff00ff;1,#3d4effff;}",
-    "LineWidth": 2,
-    "Effect": {}
+"default":{
+    "stroke": "#cccccc",
+    "fill": "SLinearGradient{0,0;0,1000;0,#ff483bff;0.5,#04ff00ff;1,#3d4effff;}",
+    "lineWidth": 2,
+    "effect": {}
 },
-"Selected": {
-    "Stroke": "#66ff66",
-    "Fill": "SRadialGradient{500,500,50;500,500,500;0,#ff483bff;0.5,#04ff00ff;1,#3d4effff;}",
-    "LineWidth": 3,
-    "Effect": {}
+"selected": {
+    "stroke": "#66ff66",
+    "fill": "SRadialGradient{500,500,50;500,500,500;0,#ff483bff;0.5,#04ff00ff;1,#3d4effff;}",
+    "lineWidth": 3,
+    "effect": {}
 },
 ```
 
 一种普通纯色风格的 json 传参
 
 ``` json
-"Default":{
-    "Stroke": "#cccccc",
-    "Fill": "SLinearGradient{0,0;0,1000;0,#ff483bff;0.5,#04ff00ff;1,#3d4effff;}",
-    "LineWidth": 2,
-    "Effect": {}
+"default":{
+    "stroke": "#cccccc",
+    "fill": "SLinearGradient{0,0;0,1000;0,#ff483bff;0.5,#04ff00ff;1,#3d4effff;}",
+    "lineWidth": 2,
+    "effect": {}
 },
-"Selected": {
-    "Stroke": "#66ff66",
-    "Fill": "SRadialGradient{500,500,50;500,500,500;0,#ff483bff;0.5,#04ff00ff;1,#3d4effff;}",
-    "LineWidth": 3,
-    "Effect": {}
+"selected": {
+    "stroke": "#66ff66",
+    "fill": "SRadialGradient{500,500,50;500,500,500;0,#ff483bff;0.5,#04ff00ff;1,#3d4effff;}",
+    "lineWidth": 3,
+    "effect": {}
 },
 ```
 
@@ -53,4 +53,4 @@
 item 传入的圆角的半径默认是 0,即不绘制圆角; 如果传入的值是数字类型且不为0则绘制圆角; <br />
 item 传入的数据 data 大写跟随数据字典; <br />
 保存item的时候,保存类型为<font color=red> String </font>,调用渐变类的``` value() ```方法即可返回当前渐变类的字符串; <br />
-item 状态切换及<font color=red> Style </font>内容详情参考 [建筑信息图-底图风格](../../format/style.md)
+item 状态切换及<font color=red> style </font>内容详情参考 [建筑信息图-底图风格](../../format/style.md)