From 5c05c1815b22ab2cb3c47ffabba73baebd4bf2b0 Mon Sep 17 00:00:00 2001 From: Nikiforenko Anton Date: Mon, 6 Jul 2020 16:07:25 +0300 Subject: [PATCH] Fix timepicker-face quarter detection (#324). --- .../timepicker-face/ngx-material-timepicker-face.component.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/material-timepicker/components/timepicker-face/ngx-material-timepicker-face.component.ts b/src/app/material-timepicker/components/timepicker-face/ngx-material-timepicker-face.component.ts index e54068f0..d802ff95 100755 --- a/src/app/material-timepicker/components/timepicker-face/ngx-material-timepicker-face.component.ts +++ b/src/app/material-timepicker/components/timepicker-face/ngx-material-timepicker-face.component.ts @@ -194,9 +194,9 @@ function roundAngle(angle: number, step: number): number { } function countAngleByCords(x0: number, y0: number, x: number, y: number, currentAngle: number): number { - if (y > y0 && x >= x0) {// II quarter + if (y >= y0 && x >= x0) {// II quarter return 180 - currentAngle; - } else if (y > y0 && x < x0) {// III quarter + } else if (y >= y0 && x < x0) {// III quarter return 180 + currentAngle; } else if (y < y0 && x < x0) {// IV quarter return 360 - currentAngle;