@@ -126,7 +126,9 @@ export const modalViewer = {
126
126
//Remove active class to modal
127
127
$ ( '.pl-js-modal' ) . removeClass ( 'pl-is-active' ) ;
128
128
129
- $ ( 'html' ) . css ( '--pl-viewport-height' , window . innerHeight - 32 + 'px' ) ;
129
+ // WIP: refactoring viewport panel to use CSS vars to resize
130
+ // $('html').css('--pl-viewport-height', window.innerHeight - 32 + 'px');
131
+
130
132
// update the wording
131
133
$ ( '.pl-js-pattern-info-toggle' ) . html ( 'Show Pattern Info' ) ;
132
134
@@ -144,10 +146,12 @@ export const modalViewer = {
144
146
*/
145
147
hide : function ( ) {
146
148
$ ( '.pl-js-modal' ) . removeClass ( 'pl-is-active' ) ;
147
- $ ( 'html' ) . css (
148
- '--pl-viewport-height' ,
149
- window . innerHeight - 32 + 'px'
150
- ) ; /* 4 */
149
+
150
+ // WIP: refactoring viewport panel to use CSS vars to resize
151
+ // $('html').css(
152
+ // '--pl-viewport-height',
153
+ // window.innerHeight - 32 + 'px'
154
+ // );
151
155
} ,
152
156
153
157
/**
@@ -207,14 +211,16 @@ export const modalViewer = {
207
211
*/
208
212
slide : function ( pos ) {
209
213
$ ( '.pl-js-modal' ) . toggleClass ( 'pl-is-active' ) ;
210
- if ( $ ( '.pl-js-modal' ) . hasClass ( 'pl-is-active' ) ) {
211
- $ ( 'html' ) . css (
212
- '--pl-viewport-height' ,
213
- window . innerHeight - $ ( '.pl-js-modal' ) . innerHeight ( ) - 32 + 'px'
214
- ) ;
215
- } else {
216
- $ ( 'html' ) . css ( '--pl-viewport-height' , window . innerHeight - 32 + 'px' ) ;
217
- }
214
+
215
+ // WIP: refactoring viewport panel to use CSS vars to resize
216
+ // if ($('.pl-js-modal').hasClass('pl-is-active')) {
217
+ // $('html').css(
218
+ // '--pl-viewport-height',
219
+ // window.innerHeight - $('.pl-js-modal').innerHeight() - 32 + 'px'
220
+ // );
221
+ // } else {
222
+ // $('html').css('--pl-viewport-height', window.innerHeight - 32 + 'px');
223
+ // }
218
224
} ,
219
225
220
226
/**
@@ -247,10 +253,12 @@ export const modalViewer = {
247
253
*/
248
254
show : function ( ) {
249
255
$ ( '.pl-js-modal' ) . addClass ( 'pl-is-active' ) ;
250
- $ ( 'html' ) . css (
251
- '--pl-viewport-height' ,
252
- window . innerHeight - $ ( '.pl-js-modal' ) . innerHeight ( ) - 32 + 'px'
253
- ) ;
256
+
257
+ // WIP: refactoring viewport panel to use CSS vars to resize
258
+ // $('html').css(
259
+ // '--pl-viewport-height',
260
+ // window.innerHeight - $('.pl-js-modal').innerHeight() - 32 + 'px'
261
+ // );
254
262
} ,
255
263
256
264
/**
0 commit comments