diff --git a/arkoala-arkts/arkui/src/ComponentBase.ts b/arkoala-arkts/arkui/src/ComponentBase.ts index 97553e69c477c6a06e587250db8ad825a6b56dfb..41a2658e65f71ac561b201b38c7393745be44a7b 100644 --- a/arkoala-arkts/arkui/src/ComponentBase.ts +++ b/arkoala-arkts/arkui/src/ComponentBase.ts @@ -15,12 +15,9 @@ import { PeerNode } from './PeerNode' import { ArkUINativeModule } from "#components" -import { AnimateParam, DoubleAnimationParam } from './generated' -import { _animationEnd, _animationStart } from './handwritten' export class ComponentBase { protected peer?: PeerNode - protected isFirstBuild: boolean = true setPeer(peer: PeerNode) { this.peer = peer } @@ -30,15 +27,4 @@ export class ComponentBase { public applyAttributesFinish(): void { ArkUINativeModule._ApplyModifierFinish(this.peer!.peer.ptr) } - public animationStart(param: AnimateParam): this { - _animationStart(param, this.isFirstBuild); - return this - } - - public animationEnd(): this { - _animationEnd(this.isFirstBuild, () => { - this.isFirstBuild = false; - }) - return this; - } } diff --git a/arkoala-arkts/arkui/src/handwritten/ArkAnimation.ts b/arkoala-arkts/arkui/src/handwritten/ArkAnimation.ts deleted file mode 100644 index a81f84ebd07a0d0e44037e517ef1efd3acb46c21..0000000000000000000000000000000000000000 --- a/arkoala-arkts/arkui/src/handwritten/ArkAnimation.ts +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) 2024 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import {addPartialUpdate} from '../Application' -import {AnimationExtender, AnimateParam} from '../generated' - -export function animateTo(param: AnimateParam, event: (() => void)): void { - if (!event) { - return; - } - AnimationExtender.OpenImplicitAnimation(param); - event(); - addPartialUpdate(event, param, (before: boolean) => { - if (!before) { - AnimationExtender.CloseImplicitAnimation(); - } - }) -} - -export function _animationStart(param: AnimateParam, isFirstBuild: boolean) { - if (isFirstBuild) { - return - } - AnimationExtender.OpenImplicitAnimation(param); - return -} - -export function _animationEnd(isFirstBuild: boolean, update: (() => void)): void { - let param: AnimateParam = {} - addPartialUpdate(() => {}, param, (before: boolean) => { - if (before) { - return; - } - AnimationExtender.CloseImplicitAnimation() - }) - return this -} \ No newline at end of file diff --git a/arkoala-arkts/arkui/src/handwritten/index.ts b/arkoala-arkts/arkui/src/handwritten/index.ts index eeb6fe2981f5a793b234b5ed48ee269e25f71cea..9b1107584ceccea8cbd033e5e918c6d37eac69b9 100644 --- a/arkoala-arkts/arkui/src/handwritten/index.ts +++ b/arkoala-arkts/arkui/src/handwritten/index.ts @@ -1,4 +1,3 @@ -export * from "./ArkAnimation" export * from "./ArkPageTransition" export * from "./ArkPageTransitionData" export * from "./Router"