@@ -38,10 +38,10 @@ export class DDResizable extends DDBaseImplement implements HTMLElementExtendOpt
38
38
private temporalRect : Rect ;
39
39
/** @internal */
40
40
private startEvent : MouseEvent ;
41
+ /** @internal value saved in the same order as _originStyleProp[] */
42
+ private elOriginStyleVal : string [ ] ;
41
43
/** @internal */
42
- private elOriginStyle ;
43
- /** @internal */
44
- private parentOriginStylePosition ;
44
+ private parentOriginStylePosition : string ;
45
45
/** @internal */
46
46
private static _originStyleProp = [ 'width' , 'height' , 'position' , 'left' , 'top' , 'opacity' , 'zIndex' ] ;
47
47
@@ -193,7 +193,7 @@ export class DDResizable extends DDBaseImplement implements HTMLElementExtendOpt
193
193
194
194
/** @internal */
195
195
private _setupHelper ( ) : DDResizable {
196
- this . elOriginStyle = DDResizable . _originStyleProp . map ( prop => this . el . style [ prop ] ) ;
196
+ this . elOriginStyleVal = DDResizable . _originStyleProp . map ( prop => this . el . style [ prop ] ) ;
197
197
this . parentOriginStylePosition = this . el . parentElement . style . position ;
198
198
if ( window . getComputedStyle ( this . el . parentElement ) . position . match ( / s t a t i c / ) ) {
199
199
this . el . parentElement . style . position = 'relative' ;
@@ -206,8 +206,8 @@ export class DDResizable extends DDBaseImplement implements HTMLElementExtendOpt
206
206
207
207
/** @internal */
208
208
private _cleanHelper ( ) : DDResizable {
209
- DDResizable . _originStyleProp . forEach ( prop => {
210
- this . el . style [ prop ] = this . elOriginStyle [ prop ] || null ;
209
+ DDResizable . _originStyleProp . forEach ( ( prop , i ) => {
210
+ this . el . style [ prop ] = this . elOriginStyleVal [ i ] || null ;
211
211
} ) ;
212
212
this . el . parentElement . style . position = this . parentOriginStylePosition || null ;
213
213
return this ;
0 commit comments