Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Distraction free mode messes up the css style of text-box #158

Open
@yookoala

Description

@yookoala

Text Box is shown as "display: grid" by default:

this.element().show('grid');

But after applying distraction free then recover, the display mode would become "display: block" because it is simply calling ".show()".

*@static distractionFree - Enable or disable the distraction free mode
* where the dialog box is hidden so that the player can look at the characters
* and background with no other elements on the way. A 'transparent' class
* is added to the quick menu when this mode is enabled.
*/
staticdistractionFree(){
if(this.global('playing')){
// Check if the distraction free is currently enabled
if(this.global('distraction_free')===true){
this.element().find('[data-component="quick-menu"] [data-action="distraction-free"] [data-string]').text(this.string('Hide'));
this.element().find('[data-component="quick-menu"] [data-action="distraction-free"] [data-icon]').replaceWith('<span data-action="distraction-free"></span>');
this.element().find('[data-component="quick-menu"]').removeClass('transparent');
this.element().find('[data-component="text-box"]').show();
this.global('distraction_free',false);
}else{
this.element().find('[data-component="quick-menu"] [data-action="distraction-free"] [data-string]').text(this.string('Show'));
this.element().find('[data-component="quick-menu"] [data-action="distraction-free"] [data-icon]').replaceWith('<span data-action="distraction-free"></span>');
this.element().find('[data-component="quick-menu"]').addClass('transparent');
this.element().find('[data-component="text-box"]').hide();
this.global('distraction_free',true);
}
}
}

Besides, it is really hard to customize the style of text-box if distraction free mode is using inline style. The better approach would be to use class to control the showing or hiding of text-box.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2026 Movatter.jp