File tree Expand file tree Collapse file tree 3 files changed +11
-1
lines changed Expand file tree Collapse file tree 3 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ Change log
5
5
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
6
6
** Table of Contents** * generated with [ DocToc] ( http://doctoc.herokuapp.com/ ) *
7
7
8
+ - [ 10.3.0-dev (TBD)] ( #1030-dev-tbd )
8
9
- [ 10.3.0 (2024-06-26)] ( #1030-2024-06-26 )
9
10
- [ 10.2.1 (2024-06-23)] ( #1021-2024-06-23 )
10
11
- [ 10.2.0 (2024-06-02)] ( #1020-2024-06-02 )
@@ -112,6 +113,9 @@ Change log
112
113
113
114
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
114
115
116
+ ## 10.3.0-dev (TBD)
117
+ * fix: [ #2734 ] ( https://github.com/gridstack/gridstack.js/bug/2734 ) rotate() JS error
118
+
115
119
## 10.3.0 (2024-06-26)
116
120
* fix: [ #2720 ] ( https://github.com/gridstack/gridstack.js/pull/2720 ) load() now creates widgets in order (used to be reverse due to old collision code)
117
121
Original file line number Diff line number Diff line change @@ -1447,7 +1447,10 @@ export class GridStack {
1447
1447
rot . x = n . x + pivotX - ( n . h - ( pivotY + 1 ) ) ;
1448
1448
rot . y = ( n . y + pivotY ) - pivotX ;
1449
1449
}
1450
+ Object . keys ( rot ) . forEach ( k => { if ( rot [ k ] === undefined ) delete rot [ k ] ; } ) ;
1451
+ const _orig = n . _orig ;
1450
1452
this . update ( el , rot ) ;
1453
+ n . _orig = _orig ; // restore as move() will delete it
1451
1454
} ) ;
1452
1455
return this ;
1453
1456
}
Original file line number Diff line number Diff line change @@ -590,7 +590,10 @@ export class Utils {
590
590
}
591
591
592
592
/** swap the given object 2 field values */
593
- public static swap ( o : unknown , a : string , b : string ) : void { const tmp = o [ a ] ; o [ a ] = o [ b ] ; o [ b ] = tmp ; }
593
+ public static swap ( o : unknown , a : string , b : string ) : void {
594
+ if ( ! o ) return ;
595
+ const tmp = o [ a ] ; o [ a ] = o [ b ] ; o [ b ] = tmp ;
596
+ }
594
597
595
598
/** returns true if event is inside the given element rectangle */
596
599
// Note: Safari Mac has null event.relatedTarget which causes #1684 so check if DragEvent is inside the coordinates instead
You can’t perform that action at this time.
0 commit comments