main
Last change
on this file 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
|
Line | |
---|
1 | import Konva from "konva";
|
---|
2 | import MapShape from "./MapShape";
|
---|
3 | import { _registerNode } from 'konva/lib/Global';
|
---|
4 | export 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.