Implementation of the space
This commit is contained in:
@@ -1,5 +1,9 @@
|
|||||||
@import '../../../main-app/global-styles';
|
@import '../../../main-app/global-styles';
|
||||||
|
|
||||||
|
:host {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
.keymap {
|
.keymap {
|
||||||
&__is-default {
|
&__is-default {
|
||||||
|
|
||||||
|
|||||||
@@ -26,6 +26,10 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.nav-tabs > li {
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
.arrowCustom {
|
.arrowCustom {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: -16px;
|
top: -16px;
|
||||||
|
|||||||
@@ -53,9 +53,12 @@ enum TabName {
|
|||||||
]))
|
]))
|
||||||
]),
|
]),
|
||||||
transition('closed => opened', [
|
transition('closed => opened', [
|
||||||
|
style({
|
||||||
|
visibility: 'visible'
|
||||||
|
}),
|
||||||
animate('200ms ease-out', keyframes([
|
animate('200ms ease-out', keyframes([
|
||||||
style({ transform: 'translateY(30px)', visibility: 'visible', opacity: 0, offset: 0 }),
|
style({ transform: 'translateY(30px)', opacity: 0, offset: 0 }),
|
||||||
style({ transform: 'translateY(0)', visibility: 'visible', opacity: 1, offset: 1 })
|
style({ transform: 'translateY(0)', opacity: 1, offset: 1 })
|
||||||
]))
|
]))
|
||||||
])
|
])
|
||||||
])
|
])
|
||||||
@@ -148,7 +151,7 @@ export class PopoverComponent implements OnChanges {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private calculatePosition() {
|
private calculatePosition() {
|
||||||
const offsetLeft: number = this.wrapPosition.left + 265;
|
const offsetLeft: number = this.wrapPosition.left + 265; // 265 is a width of the side menu with a margin
|
||||||
const popover: HTMLElement = this.popoverHost.nativeElement;
|
const popover: HTMLElement = this.popoverHost.nativeElement;
|
||||||
let newLeft: number = this.keyPosition.left + (this.keyPosition.width / 2);
|
let newLeft: number = this.keyPosition.left + (this.keyPosition.width / 2);
|
||||||
|
|
||||||
@@ -163,7 +166,8 @@ export class PopoverComponent implements OnChanges {
|
|||||||
newLeft -= popover.offsetWidth / 2;
|
newLeft -= popover.offsetWidth / 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.topPosition = this.keyPosition.top + this.keyPosition.height + 7;
|
// 7 is a space between a bottom key position and a popover
|
||||||
|
this.topPosition = this.keyPosition.top + this.keyPosition.height + 7 + window.scrollY;
|
||||||
this.leftPosition = newLeft;
|
this.leftPosition = newLeft;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,10 @@
|
|||||||
:host {
|
:host {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
display: block;
|
display: block;
|
||||||
|
|
||||||
|
&.space {
|
||||||
|
margin-bottom: 405px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
svg-keyboard {
|
svg-keyboard {
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import {
|
|||||||
ChangeDetectionStrategy,
|
ChangeDetectionStrategy,
|
||||||
Component,
|
Component,
|
||||||
ElementRef,
|
ElementRef,
|
||||||
|
HostBinding,
|
||||||
HostListener,
|
HostListener,
|
||||||
Input,
|
Input,
|
||||||
OnChanges,
|
OnChanges,
|
||||||
@@ -107,6 +108,10 @@ export class SvgKeyboardWrapComponent implements OnInit, OnChanges {
|
|||||||
private wrapHost: HTMLElement;
|
private wrapHost: HTMLElement;
|
||||||
private keyElement: HTMLElement;
|
private keyElement: HTMLElement;
|
||||||
|
|
||||||
|
@HostBinding('class.space') get space() {
|
||||||
|
return this.popoverEnabled;
|
||||||
|
}
|
||||||
|
|
||||||
@HostListener('window:resize')
|
@HostListener('window:resize')
|
||||||
onResize() {
|
onResize() {
|
||||||
if (this.wrapHost) {
|
if (this.wrapHost) {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
main-app {
|
main-app {
|
||||||
display: block;
|
display: block;
|
||||||
height: 100vh;
|
min-height: 100vh;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
position: relative;
|
position: relative;
|
||||||
@@ -11,7 +11,6 @@ main-app {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.main-content {
|
.main-content {
|
||||||
height: 100%;
|
|
||||||
margin-left: 250px;
|
margin-left: 250px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user