Преглед на файлове

更改源码提取位置

haojianlong преди 4 години
родител
ревизия
e0c3d1d25d

+ 1 - 1
docs/.vuepress/components/big/items/column.vue

@@ -6,7 +6,7 @@
 
 <script>
     import {SGraphScene, SGraphView} from "@persagy-web/graph/";
-    import {SColumnItem} from "../../../../guides/big/items/src/SColumnItem";
+    import {SColumnItem} from "@persagy-web/big/lib/items/floor/SColumnItem";
 
 
     export default {

+ 5 - 5
docs/.vuepress/components/big/items/door.vue

@@ -6,7 +6,7 @@
 
 <script>
     import {SGraphScene, SGraphView} from "@persagy-web/graph/";
-    import {SDoorItem} from "../../../../guides/big/items/src/SDoorItem";
+    import {SDoorItem} from "@persagy-web/big/lib/items/floor/SDoorItem";
 
 
     export default {
@@ -17,10 +17,10 @@
                 // 图中靠上位置的黑色矩形轮廓
                 outline1:[[{X:12000,Y:10000},{X:12000,Y:30000}]],
                 // 图中靠下位置的,绘制多个图形,会覆盖
-                outline2:[
-                    [{X:120,Y:-30},{X:120,Y:-50},{X:10,Y:-50},{X:10,Y:-30}],
-                    [{X:20,Y:-30},{X:20,Y:-85},{X:110,Y:-85},{X:110,Y:-40}]
-                ]
+                // outline2:[
+                //     [{X:120,Y:-30},{X:120,Y:-50},{X:10,Y:-50},{X:10,Y:-30}],
+                //     [{X:20,Y:-30},{X:20,Y:-85},{X:110,Y:-85},{X:110,Y:-40}]
+                // ]
             }
         },
         mounted() {

+ 1 - 1
docs/.vuepress/components/big/items/space.vue

@@ -6,7 +6,7 @@
 
 <script>
     import {SGraphScene, SGraphView} from "@persagy-web/graph/";
-    import {SSpaceItem} from "../../../../guides/big/items/src/SSpaceItem";
+    import {SSpaceItem} from "@persagy-web/big/lib/items/floor/SSpaceItem";
 
 
     export default {

+ 1 - 1
docs/.vuepress/components/big/items/virtualWall.vue

@@ -6,7 +6,7 @@
 
 <script>
     import {SGraphScene, SGraphView} from "@persagy-web/graph/";
-    import {SVirtualWallItem} from "../../../../guides/big/items/src/SVirtualWallItem";
+    import {SVirtualWallItem} from "@persagy-web/big/lib/items/floor/SVirtualWallItem";
 
 
     export default {

+ 1 - 1
docs/.vuepress/components/big/items/wall.vue

@@ -6,7 +6,7 @@
 
 <script>
     import {SGraphScene, SGraphView} from "@persagy-web/graph/";
-    import {SWallItem} from "../../../../guides/big/items/src/SWallItem";
+    import {SWallItem} from "@persagy-web/big/lib/items/floor/SWallItem";
 
 
     export default {

+ 1 - 1
docs/.vuepress/components/big/items/window.vue

@@ -6,7 +6,7 @@
 
 <script>
     import {SGraphScene, SGraphView} from "@persagy-web/graph/";
-    import {SWindowItem} from "../../../../guides/big/items/src/SWindowItem";
+    import {SWindowItem} from "@persagy-web/big/lib/items/floor/SWindowItem";
 
 
     export default {

+ 2 - 1
docs/.vuepress/components/big/items/zone.vue

@@ -6,7 +6,8 @@
 
 <script>
     import {SGraphScene, SGraphView} from "@persagy-web/graph/";
-    import {SZoneItem} from "../../../../guides/big/items/src/SZoneItem";
+    import {SZoneItem} from "@persagy-web/big/lib/items/floor/ZoneItem";
+
     export default {
         name: "zone",
         data(){

+ 38 - 0
docs/.vuepress/components/engine/shape/path.vue

@@ -0,0 +1,38 @@
+<template>
+    <canvas id="pathCanvas" width="740" height="250" />
+</template>
+
+<script>
+    import {SCanvasView, SPath} from "@persagy-web/draw/lib";
+
+    class TestView222 extends SCanvasView {
+        constructor() {
+            super('pathCanvas');
+            this.path = new SPath();
+            this.path.polygon([{x:700,y:150},{x:0,y:150},{x:0,y:0}]);
+            this.path.polygon([{x:100,y:100},{x:100,y:200},{x:200,y:200}]);
+            // this.path.polygon([{x:0,y:0},{x:0,y:150},{x:700,y:150}]);
+            // this.path.polygon([{x:200,y:200},{x:100,y:200},{x:100,y:100}]);
+        }
+
+        onDraw(painter) {
+            console.log(this.path)
+            painter.drawPath(this.path)
+        }
+    }
+    export default {
+        name: 'pathCanvas',
+        data(){
+            return{
+                view: ''
+            }
+        },
+        mounted() {
+            new TestView222()
+        }
+    }
+</script>
+
+<style scoped>
+
+</style>

+ 46 - 0
docs/.vuepress/components/scene/items/area.vue

@@ -0,0 +1,46 @@
+<template>
+    <div style="margin-top: 10px;">
+<!--        <el-button size="small" @click="changeEnable">切换item1禁用状态</el-button>-->
+<!--        圆角半径 : <el-input-number @change="changeY" v-model="R" size="mini" style="width: 100px"></el-input-number>-->
+        <canvas :id="id" width="740" height="400" />
+    </div>
+</template>
+
+<script>
+    import {SGraphAreaGroupItem,SGraphScene, SGraphView} from "@persagy-web/graph/lib";
+
+    export default {
+        name: "areaCanvas",
+        data(){
+            return{
+                id: 'area'+Date.now(),
+                view: '',
+                outline: [
+                    [
+                        [{X: 0, Y:0},{X: 0, Y:-100},{X: 100, Y:-100}],
+                        // [{X: 800, Y:200},{X: 800, Y:800},{X: 200, Y:800},{X: 200, Y:200}]
+                    ]
+                ]
+            }
+        },
+        mounted() {
+            this.init();
+        },
+        methods:{
+            init(){
+                this.view = new SGraphView(this.id);
+                const scene = new SGraphScene();
+                console.log(this.outline[0][0])
+                const item = new SGraphAreaGroupItem(null, {OutLine: this.outline});
+                scene.addItem(item);
+                this.view.scene = scene;
+                this.view.fitSceneToView();
+                console.log(item)
+            }
+        }
+    }
+</script>
+
+<style scoped>
+
+</style>

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

@@ -91,6 +91,10 @@ module.exports = {
                     {
                         text: "建筑信息图",
                         link: "http://adm.sagacloud.cn:8080/api/web/big/"
+                    },
+                    {
+                        text: "编辑器",
+                        link: "http://adm.sagacloud.cn:8080/api/web/edit/"
                     }
                 ]
             }

+ 12 - 1
docs/guides/engine/draw.md

@@ -1,4 +1,5 @@
-# 绘制形状
+# 绘制形状111       
+
 ::: details 目录
 [[toc]]
 :::
@@ -41,9 +42,19 @@
 
 <<< @/docs/.vuepress/components/engine/shape/Circle1.vue
 
+:::
 
 ## 椭圆
 
 ## 多边形
 
 ## 路径
+
+<engine-shape-path /> 
+
+::: details 查看代码
+
+<<< @/docs/.vuepress/components/engine/shape/path.vue
+
+:::
+

+ 2 - 0
docs/guides/scene/items/area.md

@@ -5,3 +5,5 @@
 :::
 
 二维点数组
+
+<scene-items-area />