Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
d9644328
X
Xts Acts
项目概览
OpenHarmony
/
Xts Acts
大约 1 年 前同步成功
通知
9
Star
22
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
X
Xts Acts
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
d9644328
编写于
3月 11, 2022
作者:
Z
zhangrao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
delete animator
Signed-off-by:
N
zhangrao
<
zhangrao@huawei.com
>
上级
e33e2fff
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
1 addition
and
140 deletion
+1
-140
ace/ace_ets_component/entry/src/main/config.json
ace/ace_ets_component/entry/src/main/config.json
+0
-1
ace/ace_ets_component/entry/src/main/ets/MainAbility/pages/animator.ets
...mponent/entry/src/main/ets/MainAbility/pages/animator.ets
+0
-76
ace/ace_ets_component/entry/src/main/ets/MainAbility/test/AnimatorJsunit.test.ets
...try/src/main/ets/MainAbility/test/AnimatorJsunit.test.ets
+0
-60
ace/ace_ets_component/entry/src/main/ets/MainAbility/test/List.test.ets
...mponent/entry/src/main/ets/MainAbility/test/List.test.ets
+1
-3
未找到文件。
ace/ace_ets_component/entry/src/main/config.json
浏览文件 @
d9644328
...
...
@@ -154,7 +154,6 @@
"pages/stateStyle"
,
"pages/focus"
,
"pages/placement"
,
"pages/animator"
,
"pages/imageAnimator"
,
"pages/animationStatus"
,
"pages/sourceType"
,
...
...
ace/ace_ets_component/entry/src/main/ets/MainAbility/pages/animator.ets
已删除
100755 → 0
浏览文件 @
e33e2fff
// @ts-nocheck
/**
* Copyright (c) 2021 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 Curves from '@ohos.curves';
@Entry
@Component
struct AnimatorTest {
@State valueX: number = 0;
@State valueY: number = 0;
@State valueW: number = 100;
@State valueH: number = 100;
@State valueS: AnimationStatus = AnimationStatus.Initial;
private curve1 = Curves.init(Curve.EaseIn);
private curve2 = Curves.init(Curve.EaseOut);
private curve3 = Curves.cubicBezier(0.1, 0.0, 0.1, 1.0);
private curve4 = Curves.spring(100, 1, 228, 30);
build() {
Column() {
Text('自定义动画')
.position({ x: this.valueX, y: this.valueY })
.size({ width: this.valueW, height: this.valueH })
.fontSize(20)
Animator('id')
.duration(1000)
.state(this.valueS)
.key('animator')
.curve(Curve.EaseOut)
.fillMode(FillMode.Backwards)
.iterations(0)
.motion(SpringMotion.apply())
.onFrame((value: number) => {
console.log("animator onFrame init")
this.valueX = 100 * this.curve1.interpolate(value)
this.valueY = 100 * this.curve2.interpolate(value)
this.valueW = 100 * this.curve3.interpolate(value)
this.valueH = 100 * this.curve4.interpolate(value)
})
.onRepeat(() => {
console.log("animator repeat init")
})
Row() {
Button('Running')
.onClick(() => {
this.valueS = AnimationStatus.Running
})
Button('Paused')
.onClick(() => {
this.valueS = AnimationStatus.Paused
})
Button('Stopped')
.onClick(() => {
this.valueS = AnimationStatus.Stopped
})
Button('Initial')
.onClick(() => {
this.valueS = AnimationStatus.Initial
})
}
}
}
}
ace/ace_ets_component/entry/src/main/ets/MainAbility/test/AnimatorJsunit.test.ets
已删除
100755 → 0
浏览文件 @
e33e2fff
// @ts-nocheck
/**
* Copyright (c) 2021 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 {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index.ets"
import router from '@system.router';
import events_emitter from '@ohos.events.emitter';
import Utils from './Utils';
export default function animatorJsunit() {
describe('animatorTest', function () {
beforeEach(async function (done) {
console.info('beforeEach ===================animator test beforeEach called===================');
let options = {
uri: 'pages/animator',
}
try {
router.clear();
let pages = router.getState();
console.info('beforeEach get prompt state pages:' + JSON.stringify(pages));
if (!('animator' == pages.name)) {
console.info('beforeEach get prompt state pages.name:' + JSON.stringify(pages.name));
let result = await router.push(options);
await Utils.sleep(2000);
console.info('beforeEach push prompt page result:' + JSON.stringify(result));
}
} catch (err) {
console.error('beforeEach push prompt page error:' + err);
}
done()
});
afterEach(async function () {
await Utils.sleep(1000);
console.info('[ afterEach ] ===================animator test after each called===================');
});
it('testAnimator01', 0, async function (done) {
console.info('[testAnimator01] START');
await Utils.sleep(1000);
let strJson = getInspectorByKey('animator');
let obj = JSON.parse(strJson);
console.info("[testAnimator01] component obj is: " + JSON.stringify(obj));
expect(obj.$type).assertEqual('Animator');
done();
});
})
}
ace/ace_ets_component/entry/src/main/ets/MainAbility/test/List.test.ets
浏览文件 @
d9644328
...
...
@@ -94,7 +94,6 @@ import rowJsunit from './RowJsunit.test.ets';
import scrollBarJsunit from './ScrollBarJsunit.test.ets';
import searchJsunit from './SearchJsunit.test.ets';
import placementJsunit from './PlacementJsunit.test.ets';
import animatorJsunit from './AnimatorJsunit.test.ets';
import imageAnimatorJsunit from './ImageAnimatorJsunit.test.ets'
import animationStatusJsunit from './AnimationStatusJsunit.test.ets';
import curvesJsunit from './CurvesJsunit.test.ets';
...
...
@@ -218,7 +217,6 @@ export default function testsuite() {
searchJsunit();
scrollBarJsunit();
placementJsunit();
animatorJsunit();
imageAnimatorJsunit();
animationStatusJsunit();
curvesJsunit();
...
...
@@ -261,4 +259,4 @@ export default function testsuite() {
PanDirectionJsunit();
sideBarJsunit();
systemAppJsunit(); //此测试文件会终止APP运行,提代码请将文件放在此文件之前
}
\ No newline at end of file
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录