mirror of
https://github.com/bitgapp/eqMac.git
synced 2024-11-22 13:07:26 +03:00
component changes
This commit is contained in:
parent
d8dafe4545
commit
d9b77c9588
@ -3,8 +3,6 @@
|
||||
:host {
|
||||
display: block;
|
||||
width: 100%;
|
||||
transition: filter;
|
||||
transition-duration: 0.5s;
|
||||
filter: grayscale(80%);
|
||||
}
|
||||
|
||||
|
@ -227,7 +227,17 @@ export class FlatSliderComponent implements OnInit, OnDestroy {
|
||||
this.dettachWindowEvents()
|
||||
}
|
||||
|
||||
@HostListener('mouseenter', [ '$event' ])
|
||||
mouseenter () {
|
||||
if (this.windowEventsAttached) {
|
||||
this.dettachWindowEvents()
|
||||
}
|
||||
}
|
||||
|
||||
private windowEventsAttached = false
|
||||
private attachWindowEvents () {
|
||||
if (this.windowEventsAttached) return
|
||||
this.windowEventsAttached = true
|
||||
window.addEventListener('mousemove', this.mousemove, true)
|
||||
window.addEventListener('mouseup', this.mouseup, true)
|
||||
}
|
||||
@ -235,6 +245,7 @@ export class FlatSliderComponent implements OnInit, OnDestroy {
|
||||
private dettachWindowEvents () {
|
||||
window.removeEventListener('mousemove', this.mousemove, true)
|
||||
window.removeEventListener('mouseup', this.mouseup, true)
|
||||
this.windowEventsAttached = false
|
||||
}
|
||||
|
||||
public doubleclickTimeout?: number
|
||||
|
@ -41,6 +41,11 @@ export const svgs = {
|
||||
open: '<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"viewBox="0 0 225.693 225.693" style="enable-background:new 0 0 225.693 225.693;" xml:space="preserve"><path d="M8.427,78.346h208.839c2.391,0,4.596,0.971,6.211,2.732s2.391,4.044,2.183,6.425l-10.222,117.15c-0.383,4.385-3.99,7.692-8.393,7.692H21.4c-4.301,0-7.9-3.224-8.374-7.497L0.053,87.698c-0.267-2.413,0.478-4.737,2.097-6.546C3.77,79.342,5.999,78.346,8.427,78.346z M214.513,63.346V44.811c0-4.143-2.524-7.465-6.667-7.465h-83.333v-2.341c0-12.219-8.176-21.659-19.25-21.659H30.43c-11.074,0-20.917,9.44-20.917,21.659v24.951c0,1.231,0.68,2.379,1.267,3.39H214.513z"/></svg>',
|
||||
pause: '<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"viewBox="0 0 15.602 15.602" style="enable-background:new 0 0 15.602 15.602;" xml:space="preserve"><g><g id="c97_pause"><path d="M10.155,0h2.961c0.191,0,0.352,0.161,0.352,0.354v14.893c0,0.195-0.16,0.355-0.352,0.355h-2.961c-0.191,0-0.355-0.16-0.355-0.355V0.354C9.8,0.161,9.964,0,10.155,0z"/><path d="M2.488,0h2.963c0.191,0,0.35,0.161,0.35,0.354v14.893c0,0.195-0.158,0.355-0.35,0.355H2.488c-0.196,0-0.354-0.161-0.354-0.356V0.354C2.134,0.161,2.292,0,2.488,0z"/></g><g id="Capa_1_73_"></g></g></svg>',
|
||||
pci: '<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 1000 1000" enable-background="new 0 0 1000 1000" xml:space="preserve"><g><path d="M93.7,80.7c-1.2,0-2.5,0.2-3.6,0.5H23.2c-7.3,0-13.2,7.4-13.2,16.6v43c0,9.2,5.9,16.6,13.2,16.6h56.1v155v374v217.5c0,8.5,6.4,15.3,14.4,15.3h58.4c7.9,0,14.3-6.8,14.3-15.3V688.5H538v141.2c0,6.8,5.1,12.3,11.5,12.3H857c6.4,0,11.5-5.5,11.5-12.3V688.5h119.8c1,0,1.8-0.9,1.8-2.1v-374c0-1.2-0.8-2.1-1.8-2.1H166.4V96c0-8.5-6.4-15.3-14.3-15.3H93.7z M241.2,385.5h278.6c5.1,0,9.2,4.4,9.2,9.8v127.9c0,5.4-4.1,9.8-9.2,9.8H241.2c-5.1,0-9.2-4.4-9.2-9.8V395.3C232,389.8,236.1,385.5,241.2,385.5z M638.5,387.9h179.3c11.2,0,20.1,9,20.1,20.2v185c0,11.2-9,20.1-20.1,20.1H638.5c-11.2,0-20.1-9-20.1-20.1v-185C618.4,397,627.4,387.9,638.5,387.9L638.5,387.9z M662.2,415.5c-12.8,0-23.1,10-23.1,22.3v134.9c0,12.4,10.3,22.3,23.1,22.3h133.3c12.8,0,23.1-10,23.1-22.3V437.8c0-12.4-10.3-22.3-23.1-22.3H662.2z"/></g></svg>',
|
||||
pencil: /* html */`
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
|
||||
<path d="M358.62 129.28L86.49 402.08 70 442l39.92-16.49 272.8-272.13-24.1-24.1zM413.07 74.84l-11.79 11.78 24.1 24.1 11.79-11.79a16.51 16.51 0 000-23.34l-.75-.75a16.51 16.51 0 00-23.35 0z"/>
|
||||
</svg>
|
||||
`,
|
||||
quit: '<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 1000 1000" enable-background="new 0 0 1000 1000" xml:space="preserve"><g><path d="M500,576.1c22.1,0,41.3-8.1,57.4-24.2c16.2-16.2,24.3-35.3,24.3-57.4V86.1c0-22.1-8.1-41.3-24.3-57.4C541.3,12.5,522.1,4.4,500,4.4c-22.1,0-41.3,8.1-57.4,24.3c-16.2,16.2-24.2,35.3-24.2,57.4v408.3c0,22.1,8.1,41.3,24.2,57.4C458.7,568,477.9,576.1,500,576.1z"/><path d="M938.7,286.8c-34.2-68.5-82.4-125.9-144.5-172.3c-17.9-13.6-38.1-18.9-60.6-16c-22.5,3-40.4,13.6-53.6,31.9c-13.6,17.9-18.8,38-15.6,60.3c3.2,22.3,13.7,40.3,31.6,53.9c41.7,31.5,73.9,70,96.7,115.5c22.8,45.5,34.1,94,34.1,145.5c0,44.2-8.6,86.5-25.8,126.7c-17.2,40.2-40.5,75-69.9,104.3c-29.4,29.3-64.1,52.6-104.3,69.9c-40.2,17.2-82.4,25.8-126.7,25.8c-44.2,0-86.4-8.6-126.6-25.8c-40.2-17.2-75-40.5-104.3-69.9c-29.3-29.4-52.6-64.1-69.9-104.3c-17.2-40.2-25.8-82.4-25.8-126.7c0-51.5,11.4-99.9,34.1-145.5c22.8-45.5,55-84,96.7-115.5c17.9-13.6,28.4-31.6,31.6-53.9c3.2-22.3-2-42.4-15.6-60.3c-13.2-18.3-30.9-28.9-53.3-31.9c-22.3-3-42.6,2.3-60.9,16C143.8,160.9,95.6,218.3,61.4,286.8C27.1,355.2,10,428.2,10,505.6c0,66.4,13,129.7,38.9,190.1c26,60.4,60.8,112.5,104.6,156.3c43.8,43.8,95.9,78.7,156.3,104.6c60.4,26,123.8,38.9,190.1,38.9c66.4,0,129.7-13,190.1-38.9c60.4-25.9,112.5-60.8,156.3-104.6s78.7-95.9,104.6-156.3C977,635.3,990,571.9,990,505.6C990,428.2,972.9,355.2,938.7,286.8z"/></g></svg>',
|
||||
reset: '<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 1000 1000" enable-background="new 0 0 1000 1000" xml:space="preserve"><g><path d="M500,132.3V10L279.6,204.8L500,399.5V268c161.9,0,293.2,131.3,293.2,293.2c0,161.9-131.3,293.2-293.2,293.2c-161.9,0-293.2-131.3-293.2-293.2c0-38.9,7.6-76,21.4-110l-127.7-46.3c-19,48.4-29.4,101.2-29.4,156.3C71.1,798,263.1,990,500,990c236.9,0,428.9-192,428.9-428.9C928.9,324.3,736.9,132.3,500,132.3z"/><path d="M408.4,569c0,48.3,39.1,87.4,87.4,87.4c48.3,0,87.4-39.1,87.4-87.4c0-48.3-39.1-87.4-87.4-87.4C447.6,481.7,408.4,520.8,408.4,569z"/></g></svg>',
|
||||
send: '<svg viewBox="0 0 512 512"><path d="M476.59 227.05l-.16-.07L49.35 49.84A23.56 23.56 0 0027.14 52 24.65 24.65 0 0016 72.59v113.29a24 24 0 0019.52 23.57l232.93 43.07a4 4 0 010 7.86L35.53 303.45A24 24 0 0016 327v113.31A23.57 23.57 0 0026.59 460a23.94 23.94 0 0013.22 4 24.55 24.55 0 009.52-1.93L476.4 285.94l.19-.09a32 32 0 000-58.8z"/></svg>',
|
||||
|
@ -160,7 +160,17 @@ export class KnobComponent implements OnInit, OnDestroy {
|
||||
this.dettachWindowEvents()
|
||||
}
|
||||
|
||||
@HostListener('mouseenter', [ '$event' ])
|
||||
mouseenter () {
|
||||
if (this.windowEventsAttached) {
|
||||
this.dettachWindowEvents()
|
||||
}
|
||||
}
|
||||
|
||||
private windowEventsAttached = false
|
||||
private attachWindowEvents () {
|
||||
if (this.windowEventsAttached) return
|
||||
this.windowEventsAttached = true
|
||||
window.addEventListener('mousemove', this.mousemove, true)
|
||||
window.addEventListener('mouseup', this.mouseup, true)
|
||||
}
|
||||
@ -168,6 +178,7 @@ export class KnobComponent implements OnInit, OnDestroy {
|
||||
private dettachWindowEvents () {
|
||||
window.removeEventListener('mousemove', this.mousemove, true)
|
||||
window.removeEventListener('mouseup', this.mouseup, true)
|
||||
this.windowEventsAttached = false
|
||||
}
|
||||
|
||||
doubleclick () {
|
||||
|
@ -8,7 +8,8 @@ import {
|
||||
ViewChild,
|
||||
EventEmitter,
|
||||
HostBinding,
|
||||
OnDestroy
|
||||
OnDestroy,
|
||||
ChangeDetectionStrategy
|
||||
} from '@angular/core'
|
||||
import {
|
||||
UtilitiesService
|
||||
@ -22,7 +23,8 @@ export interface SkeuomorphSliderValueChangedEvent {
|
||||
@Component({
|
||||
selector: 'eqm-skeuomorph-slider',
|
||||
templateUrl: './skeuomorph-slider.component.html',
|
||||
styleUrls: [ './skeuomorph-slider.component.scss' ]
|
||||
styleUrls: [ './skeuomorph-slider.component.scss' ],
|
||||
changeDetection: ChangeDetectionStrategy.OnPush
|
||||
})
|
||||
export class SkeuomorphSliderComponent implements OnInit, OnDestroy {
|
||||
constructor (
|
||||
@ -148,7 +150,17 @@ export class SkeuomorphSliderComponent implements OnInit, OnDestroy {
|
||||
this.dettachWindowEvents()
|
||||
}
|
||||
|
||||
@HostListener('mouseenter', [ '$event' ])
|
||||
mouseenter () {
|
||||
if (this.windowEventsAttached) {
|
||||
this.dettachWindowEvents()
|
||||
}
|
||||
}
|
||||
|
||||
private windowEventsAttached = false
|
||||
private attachWindowEvents () {
|
||||
if (this.windowEventsAttached) return
|
||||
this.windowEventsAttached = true
|
||||
window.addEventListener('mousemove', this.mousemove, true)
|
||||
window.addEventListener('mouseup', this.mouseup, true)
|
||||
}
|
||||
@ -156,6 +168,7 @@ export class SkeuomorphSliderComponent implements OnInit, OnDestroy {
|
||||
private dettachWindowEvents () {
|
||||
window.removeEventListener('mousemove', this.mousemove, true)
|
||||
window.removeEventListener('mouseup', this.mouseup, true)
|
||||
this.windowEventsAttached = false
|
||||
}
|
||||
|
||||
doubleclick () {
|
||||
|
@ -8,7 +8,6 @@ import { FadeInOutAnimation } from '../../animations/fade-in-out'
|
||||
<div class="tooltip-container">
|
||||
<eqm-tooltip
|
||||
*ngFor="let tooltip of tooltipService.components"
|
||||
[@FadeInOut]
|
||||
[text]="tooltip.text"
|
||||
[parent]="tooltip.parent"
|
||||
[positionSide]="tooltip.positionSide"
|
||||
|
Loading…
Reference in New Issue
Block a user