未验证 提交 83922b23 编写于 作者: C cuijian-dexter 提交者: GitHub

Formatting Code

上级 13d42684
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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 * as zrUtil from 'zrender/src/core/util';
import * as graphic from '../../util/graphic';
......@@ -69,8 +69,7 @@ function toggleItemSelected(el, layout, isSelected, selectedOffset, hasAnimation
hasAnimation
// animateTo will stop revious animation like update transition
?
el.animate()
? el.animate()
.when(200, {
position: position
})
......@@ -115,7 +114,7 @@ function PiePiece(data, idx) {
var piePieceProto = PiePiece.prototype;
piePieceProto.updateData = function(data, idx, firstCreate) {
piePieceProto.updateData = function (data, idx, firstCreate) {
var sector = this.childAt(0);
......@@ -147,7 +146,8 @@ piePieceProto.updateData = function(data, idx, firstCreate) {
}, seriesModel, idx);
}
} else {
}
else {
graphic.updateProps(sector, {
shape: sectorShape
}, seriesModel, idx);
......@@ -157,7 +157,8 @@ piePieceProto.updateData = function(data, idx, firstCreate) {
var visualColor = data.getItemVisual(idx, 'color');
sector.useStyle(
zrUtil.defaults({
zrUtil.defaults(
{
lineJoin: 'bevel',
fill: visualColor
},
......@@ -188,7 +189,6 @@ piePieceProto.updateData = function(data, idx, firstCreate) {
}
}, 300, 'elasticOut');
}
function onNormal() {
sector.stopAnimation(true);
sector.animateTo({
......@@ -339,7 +339,7 @@ var PieView = ChartView.extend({
var piePiece = new PiePiece(data, idx);
// Default expansion animation
if (isFirstRender && animationType !== 'scale') {
piePiece.eachChild(function(child) {
piePiece.eachChild(function (child) {
child.stopAnimation(true);
});
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册