Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

31
LINES

< > BotCompany Repo | #1032361 // HFullScreenDim

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (4273L/24K).

1  
sclass HFullScreenDim {
2  
  S id = "dimThePage";
3  
  int zIndex = 999;
4  
  S color = "black";
5  
  double opacity = 0.5;
6  
  S onUndim;
7  
  
8  
  S html() {
9  
    ret hcss("#" + id + replaceDollarVars([[ {
10  
       position:fixed;
11  
      top:0;
12  
      bottom:0;
13  
      left:0;
14  
      right:0;
15  
      background: $color;
16  
      opacity: $opacity;
17  
      z-index: $zIndex;
18  
      /*pointer-events: none;*/
19  
      visibility: hidden;
20  
    }]], +color, +opacity, +zIndex))
21  
      + div("", +id, onclick := nemptyLinesLL(js_undim(), onUndim));
22  
  }
23  
  
24  
  S js_dim() {
25  
    ret js_dollarVars([[document.getElementById($id).style.visibility = "visible";]], +id);
26  
  }
27  
  
28  
  S js_undim() {
29  
    ret js_dollarVars([[document.getElementById($id).style.visibility = "hidden";]], +id);
30  
  }
31  
}

Author comment

Began life as a copy of #1032360

download  show line numbers  debug dex  old transpilations   

Travelled to 5 computer(s): bhatertpkbcr, ekrmjmnbrukm, mowyntqkapby, mqqgnosmbjvj, pyentgdyhuwx

No comments. add comment

Snippet ID: #1032361
Snippet name: HFullScreenDim
Eternal ID of this version: #1032361/8
Text MD5: b041bae9932b7b26307759504e5b8261
Transpilation MD5: 2211800b1823bd050f8340a3cf0b7368
Author: stefan
Category: javax / html
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-08-31 17:43:50
Source code size: 772 bytes / 31 lines
Pitched / IR pitched: No / No
Views / Downloads: 102 / 222
Version history: 7 change(s)
Referenced in: [show references]