@@ -38,10 +38,10 @@ export class DDResizable extends DDBaseImplement implements HTMLElementExtendOpt
3838 private temporalRect : Rect ;
3939 /** @internal */
4040 private startEvent : MouseEvent ;
41+ /** @internal value saved in the same order as _originStyleProp[] */
42+ private elOriginStyleVal : string [ ] ;
4143 /** @internal */
42- private elOriginStyle ;
43- /** @internal */
44- private parentOriginStylePosition ;
44+ private parentOriginStylePosition : string ;
4545 /** @internal */
4646 private static _originStyleProp = [ 'width' , 'height' , 'position' , 'left' , 'top' , 'opacity' , 'zIndex' ] ;
4747
@@ -193,7 +193,7 @@ export class DDResizable extends DDBaseImplement implements HTMLElementExtendOpt
193193
194194 /** @internal */
195195 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 ] ) ;
197197 this . parentOriginStylePosition = this . el . parentElement . style . position ;
198198 if ( window . getComputedStyle ( this . el . parentElement ) . position . match ( / s t a t i c / ) ) {
199199 this . el . parentElement . style . position = 'relative' ;
@@ -206,8 +206,8 @@ export class DDResizable extends DDBaseImplement implements HTMLElementExtendOpt
206206
207207 /** @internal */
208208 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 ;
211211 } ) ;
212212 this . el . parentElement . style . position = this . parentOriginStylePosition || null ;
213213 return this ;
0 commit comments