fix(roomSelector): room selector highlight (#9)

This commit is contained in:
Vladimir Lugovsky 2017-07-07 18:09:04 +03:00 committed by Dmitry Nehaychik
parent fa8342cc6d
commit 17e41f58b5
3 changed files with 15 additions and 2 deletions

View file

@ -74,6 +74,7 @@
</g>
<g [attr.id]="room.id" [class.selected-room]="selectedRoom == room.id" *ngFor="let room of sortedRooms">
<path class="room-bg-border-grad" (click)="roomSelected(room.id)" [attr.d]="room.area.d" />
<path class="room-bg" (click)="roomSelected(room.id)" [attr.d]="room.area.d" />
<path class="room-border" [attr.d]="room.border.d" />
<text class="room-text" (click)="roomSelected(room.id)" text-anchor="middle"

Before

Width:  |  Height:  |  Size: 5.5 KiB

After

Width:  |  Height:  |  Size: 5.6 KiB

Before After
Before After

View file

@ -39,6 +39,13 @@ svg {
stroke: transparent;
cursor: pointer;
transition: fill 0.4s ease-out;
stroke-width: 4px;
}
.room-bg-border-grad {
fill: none;
stroke: none;
stroke-width: 4px;
}
.room-text {
@ -50,10 +57,15 @@ svg {
.selected-room {
z-index: 40;
.room-bg {
stroke: rgba(0, 255, 170, 0.5);
stroke: rgba(0, 255, 170, 1);
fill: rgba(0, 255, 170, 0.5);
filter: url('#f2');
}
.room-bg-border-grad {
stroke: rgba(0, 255, 170, 1);
filter: url('#f2');
}
.room-border {
stroke: #00f9a6;
}

View file

@ -10,7 +10,7 @@ export class RoomSelectorComponent {
sortedRooms = [];
viewBox = '-20 -20 608.88 407.99';
viewBox = '-20 -20 618.88 407.99';
roomSvg = {
borders: [{