This repository was archived by the owner on Aug 27, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 6 files changed +24
-7
lines changed
Expand file tree Collapse file tree 6 files changed +24
-7
lines changed Original file line number Diff line number Diff line change 5353<body data-main-image="<?= $ mainimage?> ">
5454 <div class="chromawrapper">
5555 <?php if ($ keying_possible ): ?>
56- <div class="canvasWrapper">
56+ <div class="canvasWrapper initial ">
5757 <canvas id="mainCanvas"></canvas>
5858 </div>
5959
Original file line number Diff line number Diff line change 4949
5050 </div>
5151
52- <div class="canvasWrapper">
52+ <div class="canvasWrapper initial ">
5353 <canvas id="mainCanvas"></canvas>
5454 </div>
5555
Original file line number Diff line number Diff line change @@ -323,4 +323,5 @@ $(document).ready(function () {
323323
324324 $ ( '#mainCanvas' ) . css ( 'height' , canvasHeight - diff + 'px' ) ;
325325 }
326+ $ ( '.canvasWrapper' ) . removeClass ( 'initial' ) ;
326327} ) ;
Original file line number Diff line number Diff line change @@ -250,6 +250,7 @@ function saveImage(cb) {
250250}
251251
252252$ ( '.backgroundPreview' ) . on ( 'click' , function ( ) {
253+ $ ( '.canvasWrapper' ) . removeClass ( 'initial' ) ;
253254 if ( $ ( '.chroma-control-bar' ) . is ( ':hidden' ) ) {
254255 $ ( '.chroma-control-bar' ) . show ( ) ;
255256 $ ( '.chromaNote' ) . empty ( ) ;
Original file line number Diff line number Diff line change 2121}
2222
2323.canvasWrapper {
24- width : 1000px ;
2524 display : inline-block ;
2625 max-width : 100% ;
2726 background-color : green ;
2827 border : 4px solid $borderColor ;
28+ & .initial {
29+ width : 1000px ;
30+ }
2931}
3032
3133#mainCanvas {
3234 display : block ;
35+ max-height : 650px ;
3336 max-width : 100% ;
3437}
3538
Original file line number Diff line number Diff line change 196196 position : absolute ;
197197 top : 40px ;
198198 right : 0 ;
199- width : 950px ;
200- max-width : 100% ;
199+ max-width : 950px ;
201200 max-height : 100% ;
202201 border : 4px solid $borderColor ;
202+ & .initial {
203+ width : 950px ;
204+ }
203205 }
204206
205207 .takeChroma ,
260262 bottom : 0 ;
261263 width : 250px ;
262264 }
265+
266+ #mainCanvas {
267+ max-height : 100% ;
268+ }
263269}
264270
265271@media (max-height : 740px ) and (orientation : landscape ) {
273279@media (max-width : 1200px ) and (orientation : landscape ) {
274280 .canvasWrapper ,
275281 .chromaNote {
276- width : 750px ;
282+ max-width : 750px ;
283+ & .initial {
284+ width : 750px ;
285+ }
277286 }
278287}
279288
280289@media (max-width : 1000px ) and (orientation : landscape ) {
281290 .canvasWrapper ,
282291 .chromaNote {
283- width : 650px ;
292+ max-width : 650px ;
293+ & .initial {
294+ width : 650px ;
295+ }
284296 }
285297}
You can’t perform that action at this time.
0 commit comments