Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Polymer v.1 full screen paper-dialog

I'm converting an old Stocks App from JQM to Polymer v.1 and i like to know if there is an easy way to have a dialog open at full screen. I checked the docs, maybe i missed something as i can see any ref to a full screen dialog.

The reason is when i click the plus button on the header to search and add a stock i get the dialog open ok

enter image description here

However when i search then the list populates but the dialog does not adjust on the page to fit/position accordingly

enter image description here

I have a workaround where i can append the list with blank paper items prior to opening the dialog

for (i = 0; i < 20; i++) { 
$("#stockslist").append('<paper-item></paper-item>');
}

enter image description here

But i would prefer if there is a class or correct css i could add to have the dialog open at full screen with no padding or margin

Thanks

like image 294
Tasos Avatar asked Jan 09 '23 00:01

Tasos


1 Answers

I did not test this, but you should be able to set the position and size on the dialog element. I have done something similar on a project I am working on.

paper-dialog { 
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 0;
    margin: 0;        
}
like image 90
epascarello Avatar answered May 16 '23 07:05

epascarello