source: imaps-frontend/src/scripts/shapes/Wall.js@ d565449

main
Last change on this file since d565449 was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago

Update repo after prototype presentation

  • Property mode set to 100644
File size: 764 bytes
RevLine 
[d565449]1import Konva from "konva";
2import MapShape from "./MapShape";
3import { _registerNode } from 'konva/lib/Global';
4export default class Wall extends MapShape {
5 constructor(mousePos, blockSize, layer, rotation,snap, draggable = true,scaleX = 1, scaleY = 1){
6 super(
7 {
8 x: mousePos.x,
9 y: mousePos.y,
10 width: blockSize * scaleX,
11 height: blockSize * 8 * scaleY,
12 fill: "#DDE0F8",
13 stroke: "grey",
14 strokeWidth: 1,
15 name: "mapObj",
16 draggable: draggable,
17 rotation: rotation,
18 zIndex: 0,
19 },
20 layer,
21 blockSize,
22 snap,
23 );
24
25 this.type = "Wall";
26 }
27 }
28
29 Wall.prototype.className = 'Wall'
30 _registerNode(Wall);
Note: See TracBrowser for help on using the repository browser.