|
@@ -7,9 +7,9 @@
|
|
|
</template>
|
|
|
|
|
|
<script lang="ts">
|
|
|
- import {SGraphItem, SGraphScene, SGraphView} from "@saga-web/graph/lib";
|
|
|
- import {SAnchorItem, SImageItem, SItemStatus, SObjectItem, STextItem} from "@saga-web/big/lib";
|
|
|
- import {SColor, SPainter, SRect, SSize, STextBaseLine} from "@saga-web/draw/lib";
|
|
|
+ import {SGraphItem, SGraphScene, SGraphView, SObjectItem, STextItem, SImageItem, SAnchorItem} from "@saga-web/graph/lib";
|
|
|
+ import { SItemStatus }from "@saga-web/big/lib";
|
|
|
+ import {SColor, SPainter, SRect, SSize} from "@saga-web/draw/lib";
|
|
|
import {SMouseEvent} from "@saga-web/base/lib";
|
|
|
|
|
|
/**
|
|
@@ -192,26 +192,32 @@
|
|
|
},
|
|
|
mounted() {
|
|
|
console.log(22222222222222222)
|
|
|
+ // @ts-ignore
|
|
|
this.view = new SGraphView("editPolygon");
|
|
|
+ // @ts-ignore
|
|
|
this.scene = new SGraphScene();
|
|
|
+ // @ts-ignore
|
|
|
this.view.scene = this.scene;
|
|
|
+ // @ts-ignore
|
|
|
this.init()
|
|
|
},
|
|
|
methods:{
|
|
|
init(){
|
|
|
+ // @ts-ignore
|
|
|
this.item = new SImgTextItem(null);
|
|
|
+ // @ts-ignore
|
|
|
this.item.moveable = true;
|
|
|
|
|
|
+ // @ts-ignore
|
|
|
this.scene.addItem(this.item);
|
|
|
// this.view.fitSceneToView();
|
|
|
},
|
|
|
- change() {
|
|
|
-
|
|
|
- },
|
|
|
changemaodian(){
|
|
|
+ // @ts-ignore
|
|
|
this.item.showAnchor = !this.item.showAnchor;
|
|
|
},
|
|
|
changetext(){
|
|
|
+ // @ts-ignore
|
|
|
this.item.showText = !this.item.showText;
|
|
|
}
|
|
|
}
|