From aa3f8b757f9a7ab4039ff494296b3263d13330a5 Mon Sep 17 00:00:00 2001 From: Igor Kulikov Date: Tue, 24 Sep 2024 13:20:56 +0300 Subject: [PATCH] UI: SCADA - Remove old animation methods. --- .../widget/lib/scada/scada-symbol.models.ts | 23 ---------- .../scada-symbol-editor.models.ts | 43 ------------------- 2 files changed, 66 deletions(-) diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/scada/scada-symbol.models.ts b/ui-ngx/src/app/modules/home/components/widget/lib/scada/scada-symbol.models.ts index c8a3990cef..91297bb689 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/scada/scada-symbol.models.ts +++ b/ui-ngx/src/app/modules/home/components/widget/lib/scada/scada-symbol.models.ts @@ -72,9 +72,6 @@ export interface ScadaSymbolApi { text: (element: Element | Element[], text: string) => void; font: (element: Element | Element[], font: Font, color: string) => void; icon: (element: Element | Element[], icon: string, size?: number, color?: string, center?: boolean) => void; - animate: (element: Element, duration: number) => Runner; - resetAnimation: (element: Element) => void; - finishAnimation: (element: Element) => void; cssAnimate: (element: Element, duration: number) => ScadaSymbolAnimation; cssAnimation: (element: Element) => ScadaSymbolAnimation | undefined; resetCssAnimation: (element: Element) => void; @@ -657,9 +654,6 @@ export class ScadaSymbolObject { text: this.setElementText.bind(this), font: this.setElementFont.bind(this), icon: this.setElementIcon.bind(this), - animate: this.animate.bind(this), - resetAnimation: this.resetAnimation.bind(this), - finishAnimation: this.finishAnimation.bind(this), cssAnimate: this.cssAnimate.bind(this), cssAnimation: this.cssAnimation.bind(this), resetCssAnimation: this.resetCssAnimation.bind(this), @@ -731,8 +725,6 @@ export class ScadaSymbolObject { const valueSetter = ValueSetter.fromSettings(this.ctx, setValueSettings, this.simulated); this.valueSetters[setBehavior.id] = valueSetter; this.valueActions.push(valueSetter); - } else if (behavior.type === ScadaSymbolBehaviorType.widgetAction) { - // TODO: } } this.renderState(); @@ -992,21 +984,6 @@ export class ScadaSymbolObject { } } - private animate(element: Element, duration: number): Runner { - this.finishAnimation(element); - return element.animate(duration, 0, 'now'); - } - - private resetAnimation(element: Element) { - element.timeline().stop(); - element.timeline(new Timeline()); - } - - private finishAnimation(element: Element) { - element.timeline().finish(); - element.timeline(new Timeline()); - } - private cssAnimate(element: Element, duration: number): ScadaSymbolAnimation { return this.cssAnimations.animate(element, duration); } diff --git a/ui-ngx/src/app/modules/home/pages/scada-symbol/scada-symbol-editor.models.ts b/ui-ngx/src/app/modules/home/pages/scada-symbol/scada-symbol-editor.models.ts index f6be48a08c..005f6abd8e 100644 --- a/ui-ngx/src/app/modules/home/pages/scada-symbol/scada-symbol-editor.models.ts +++ b/ui-ngx/src/app/modules/home/pages/scada-symbol/scada-symbol-editor.models.ts @@ -1235,49 +1235,6 @@ export const scadaSymbolContextCompletion = (metadata: ScadaSymbolMetadata, tags }, ] }, - animate: { - meta: 'function', - description: 'Finishes any previous animation and starts new animation for SVG element.', - args: [ - { - name: 'element', - description: 'SVG element', - type: 'Element' - }, - { - name: 'duration', - description: 'Animation duration in milliseconds', - type: 'number' - } - ], - return: { - description: 'Instance of SVG.Runner which has the same methods as any element and additional methods to control the runner.', - type: 'SVG.Runner' - } - }, - resetAnimation: { - meta: 'function', - description: 'Stops animation if any and restore SVG element initial state, resets animation timeline.', - args: [ - { - name: 'element', - description: 'SVG element', - type: 'Element' - }, - ] - }, - finishAnimation: { - meta: 'function', - description: 'Finishes animation if any, SVG element state updated according to the end animation values, ' + - 'resets animation timeline.', - args: [ - { - name: 'element', - description: 'SVG element', - type: 'Element' - }, - ] - }, generateElementId: { meta: 'function', description: 'Generates new unique element id.',