File tree Expand file tree Collapse file tree 3 files changed +40
-3
lines changed Expand file tree Collapse file tree 3 files changed +40
-3
lines changed Original file line number Diff line number Diff line change 11{
2- "/js/field.js" : " /js/field.js?id=15620b3e531fb4496884 "
2+ "/js/field.js" : " /js/field.js?id=e534e43a5e9b3e765e3b "
33}
Original file line number Diff line number Diff line change 11<template >
2- <default-field :field =" field" :errors =" errors" >
2+ <default-field :field =" field" :errors =" errors" :full-width-content = " true " >
33 <template slot="field">
4+ <button
5+ id =" fullscreenToggleButton"
6+ class =" text-xs bg-90 hover:bg-black text-white font-semibold rounded-sm px-4 py-1 m-1 border"
7+ @click =" toggleFullscreen"
8+ type =" button" >
9+ ▶ Enter fullscreen
10+ </button >
411 <div :id =containerId :style =" {height: field.height || '800px'}" ></div >
512 <p v-if =" hasError" class =" my-2 text-danger" >
613 {{ firstError }}
2835 },
2936
3037 methods: {
38+ toggleFullscreen () {
39+ document .body .classList .toggle (' overflow-hidden' );
40+ const container = document .getElementById (` ${ this .containerId } ` );
41+ container .classList .toggle (' z-50' );
42+ container .classList .toggle (' fullscreen' );
43+
44+ const toggleButton = document .querySelector (` #fullscreenToggleButton` );
45+ toggleButton .classList .toggle (' stickyControl' );
46+ container .classList .contains (' fullscreen' )
47+ ? toggleButton .innerText = ' ✖︎ Exit fullscreen'
48+ : toggleButton .innerText = ' ▶ Enter fullscreen' ;
49+ },
50+
3151 /*
3252 * Set the initial, internal value for the field.
3353 */
101121 },
102122 }
103123 </script >
124+
125+ <style scoped>
126+ .fullscreen {
127+ position : fixed ;
128+ left : 1vw ;
129+ top : 1vh ;
130+ width : 98vw !important ;
131+ height : 98vh !important ;
132+ }
133+
134+ .stickyControl {
135+ position : fixed ;
136+ left : 1vw ;
137+ top : 1vh ;
138+ z-index : 51 ;
139+ }
140+ </style >
You can’t perform that action at this time.
0 commit comments