File tree Expand file tree Collapse file tree 4 files changed +15
-1
lines changed Expand file tree Collapse file tree 4 files changed +15
-1
lines changed Original file line number Diff line number Diff line change 48394839 "message" : " Uploaded all {{length}} characters to the OSD"
48404840 },
48414841
4842+ "osdToggleOrientation" : {
4843+ "message" : " Orientation"
4844+ },
48424845 "osdSetupSave" : {
48434846 "message" : " Save"
48444847 },
Original file line number Diff line number Diff line change @@ -541,7 +541,7 @@ button {
541541@media all and (max-width : 575px ) {
542542 .tab-osd {
543543 .osd-preview {
544- min- width : 100 % ;
544+ width : fit-content ;
545545 order : 1 ;
546546 }
547547 .osd-feature {
Original file line number Diff line number Diff line change @@ -2609,6 +2609,8 @@ osd.initialize = function(callback) {
26092609 // must invoke before i18n.localizePage() since it adds translation keys for expected logo size
26102610 LogoManager . init ( FONT , SYM . LOGO ) ;
26112611
2612+ $ ( 'div.btn.orientation' ) . toggle ( GUI . isCordova ( ) ) ;
2613+
26122614 // translate to user-selected language
26132615 i18n . localizePage ( ) ;
26142616
@@ -3281,6 +3283,8 @@ osd.initialize = function(callback) {
32813283 self . analyticsChanges = { } ;
32823284 } ) ;
32833285
3286+ $ ( 'a.orientation' ) . on ( 'click' , ( ) => screen . orientation . lock ( screen . orientation . type . startsWith ( "portrait" ) ? "landscape" : "portrait" ) ) ;
3287+
32843288 // font preview window
32853289 const fontPreviewElement = $ ( '.font-preview' ) ;
32863290
@@ -3411,6 +3415,10 @@ osd.cleanup = function(callback) {
34113415 OSD . GUI . fontManager . destroy ( ) ;
34123416 }
34133417
3418+ if ( GUI . isCordova ( ) ) {
3419+ window . screen . orientation . lock ( "portrait" ) ;
3420+ }
3421+
34143422 // unbind "global" events
34153423 $ ( document ) . unbind ( 'keypress' ) ;
34163424 $ ( document ) . off ( 'click' , 'span.progressLabel a' ) ;
Original file line number Diff line number Diff line change @@ -197,6 +197,9 @@ <h3 i18n="osdSetupCustomLogoInfoTitle"></h3>
197197
198198 < div class ="supported hide ">
199199 < div class ="content_toolbar " style ="left:0; ">
200+ < div class ="btn orientation ">
201+ < a class ="orientation " href ="# " i18n ="osdToggleOrientation "> </ a >
202+ </ div >
200203 < div class ="btn ">
201204 < a class ="requires-max7456-font-device-detected fonts " id ="fontmanager " href ="# " i18n ="osdSetupFontManager "> </ a >
202205 </ div >
You can’t perform that action at this time.
0 commit comments