From 8618446f65870064a8406b11dff8ff8b1406c7ff Mon Sep 17 00:00:00 2001 From: Sergey Andrievskiy Date: Sun, 30 Jun 2019 15:08:44 +0300 Subject: [PATCH] fix(temperature): prevent id duplicates Fixes #2148 --- .../temperature-dragger/temperature-dragger.component.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/app/pages/dashboard/temperature/temperature-dragger/temperature-dragger.component.ts b/src/app/pages/dashboard/temperature/temperature-dragger/temperature-dragger.component.ts index ebbf0ab1..a820ad30 100644 --- a/src/app/pages/dashboard/temperature/temperature-dragger/temperature-dragger.component.ts +++ b/src/app/pages/dashboard/temperature/temperature-dragger/temperature-dragger.component.ts @@ -11,6 +11,7 @@ import { } from '@angular/core'; import { Location, LocationStrategy } from '@angular/common'; +let uniqueId = 0; const VIEW_BOX_SIZE = 300; @Component({ @@ -63,7 +64,7 @@ export class TemperatureDraggerComponent implements AfterViewInit, OnChanges { off = false; oldValue: number; - svgControlId = new Date().getTime(); + svgControlId = uniqueId++; scaleFactor = 1; bottomAngleRad = 0; radius = 100;