@@ -259,29 +259,29 @@ export abstract class Graphic<T extends Partial<IGraphicAttribute> = Partial<IGr
259259 declare y1WithoutTransform ?: number ;
260260
261261 // aabbBounds,所有图形都需要有,所以初始化即赋值
262- declare protected _AABBBounds : IAABBBounds ;
262+ protected declare _AABBBounds : IAABBBounds ;
263263 get AABBBounds ( ) : IAABBBounds {
264264 return this . tryUpdateAABBBounds ( ) ;
265265 }
266266 // 具有旋转的包围盒,部分图元需要,动态初始化
267- declare protected _OBBBounds ?: IOBBBounds ;
267+ protected declare _OBBBounds ?: IOBBBounds ;
268268 get OBBBounds ( ) : IOBBBounds {
269269 return this . tryUpdateOBBBounds ( ) ;
270270 }
271- declare protected _globalAABBBounds : IAABBBounds ;
271+ protected declare _globalAABBBounds : IAABBBounds ;
272272 // 全局包围盒,部分图元需要,动态初始化,建议使用AABBBounds
273273 get globalAABBBounds ( ) : IAABBBounds {
274274 return this . tryUpdateGlobalAABBBounds ( ) ;
275275 }
276- declare protected _transMatrix : Matrix ;
276+ protected declare _transMatrix : Matrix ;
277277 get transMatrix ( ) : Matrix {
278278 return this . tryUpdateLocalTransMatrix ( true ) ;
279279 }
280- declare protected _globalTransMatrix : Matrix ;
280+ protected declare _globalTransMatrix : Matrix ;
281281 get globalTransMatrix ( ) : Matrix {
282282 return this . tryUpdateGlobalTransMatrix ( true ) ;
283283 }
284- declare protected _updateTag : number ;
284+ protected declare _updateTag : number ;
285285
286286 // 上次更新的stamp
287287 declare stamp ?: number ;
@@ -1046,7 +1046,10 @@ export abstract class Graphic<T extends Partial<IGraphicAttribute> = Partial<IGr
10461046 // (animate as any).stateNames = stateNames;
10471047 // animate.to(animateAttrs, stateAnimateConfig.duration, stateAnimateConfig.easing);
10481048 noAnimateAttrs && this . setAttributesAndPreventAnimate ( noAnimateAttrs , false , { type : AttributeUpdateType . STATE } ) ;
1049- // Object.assign((this as any).finalAttribute, attrs);
1049+ // 应用状态的时候要更新 finalAttribute 也就是目标属性
1050+ if ( ( this as any ) . finalAttribute ) {
1051+ Object . assign ( ( this as any ) . finalAttribute , attrs ) ;
1052+ }
10501053 } else {
10511054 this . stopStateAnimates ( ) ;
10521055 this . setAttributesAndPreventAnimate ( attrs , false , { type : AttributeUpdateType . STATE } ) ;
@@ -1095,7 +1098,7 @@ export abstract class Graphic<T extends Partial<IGraphicAttribute> = Partial<IGr
10951098 private getNormalAttribute ( key : string ) {
10961099 const value = ( this . attribute as any ) [ key ] ;
10971100
1098- if ( this . animates ) {
1101+ if ( this . animates && this . animates . size ) {
10991102 // this.animates.forEach(animate => {
11001103 // if ((animate as any).stateNames) {
11011104 // const endProps = animate.getEndProps();
0 commit comments