File tree 2 files changed +11
-4
lines changed
2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -398,6 +398,13 @@ export function createElement(tagName) {
398
398
}
399
399
400
400
export function appendChild ( element , elem ) {
401
+ if ( elem . length ) {
402
+ each ( elem , ( el ) => {
403
+ appendChild ( element , el ) ;
404
+ } ) ;
405
+ return ;
406
+ }
407
+
401
408
element . appendChild ( elem ) ;
402
409
}
403
410
Original file line number Diff line number Diff line change @@ -116,7 +116,6 @@ class Viewer {
116
116
let toolbar ;
117
117
let navbar ;
118
118
let title ;
119
- let rotate ;
120
119
121
120
template . innerHTML = TEMPLATE ;
122
121
@@ -142,9 +141,10 @@ class Viewer {
142
141
$ . toggleClass ( toolbar . querySelectorAll ( 'li[class*="flip"]' ) , 'viewer-invisible' , ! options . scalable ) ;
143
142
144
143
if ( ! options . rotatable ) {
145
- rotate = toolbar . querySelectorAll ( 'li[class*="rotate"]' ) ;
146
- $ . addClass ( rotate , 'viewer-invisible' ) ;
147
- $ . appendChild ( toolbar , rotate ) ;
144
+ const rotates = toolbar . querySelectorAll ( 'li[class*="rotate"]' ) ;
145
+
146
+ $ . addClass ( rotates , 'viewer-invisible' ) ;
147
+ $ . appendChild ( toolbar , rotates ) ;
148
148
}
149
149
150
150
if ( options . inline ) {
You can’t perform that action at this time.
0 commit comments