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:
986 bytes
|
Rev | Line | |
---|
[d565449] | 1 | import RenderedMapShape from "./RenderedMapShape.js";
|
---|
| 2 |
|
---|
| 3 | export default class RenderedEntrance extends RenderedMapShape{
|
---|
| 4 | constructor(attrs,scaleX,scaleY){
|
---|
| 5 | super({
|
---|
| 6 | x: attrs.x,
|
---|
| 7 | y: attrs.y,
|
---|
| 8 | width: attrs.width * scaleX,
|
---|
| 9 | height: attrs.height * scaleY,
|
---|
| 10 | fill: '#1c3cff',
|
---|
| 11 | stroke: 'black',
|
---|
| 12 | strokeWidth: 1,
|
---|
| 13 | draggable: false,
|
---|
| 14 | rotation: attrs.rotation,
|
---|
| 15 | cornerRadius:3,
|
---|
| 16 | zIndex: 0
|
---|
| 17 | });
|
---|
| 18 |
|
---|
| 19 | this.info.name = attrs.obj_name;
|
---|
| 20 | this.info.description = attrs.description;
|
---|
| 21 |
|
---|
| 22 |
|
---|
| 23 | this.on("mouseenter",() => {
|
---|
| 24 | console.log("HOVER ROOM IN", this.x());
|
---|
| 25 | console.log(this.info.name,"NAME");
|
---|
| 26 | this.stroke('purple');
|
---|
| 27 | })
|
---|
| 28 | this.on("mouseleave", () => {
|
---|
| 29 | console.log("HOVER ROOM OUT");
|
---|
| 30 | this.opacity(1);
|
---|
| 31 | this.stroke('black')
|
---|
| 32 |
|
---|
| 33 | })
|
---|
| 34 |
|
---|
| 35 | this.initText()
|
---|
| 36 | }
|
---|
| 37 | } |
---|
Note:
See
TracBrowser
for help on using the repository browser.