dan-reznik / Elliptical-Billiards-Triangular-Orbits

Invariants of N-Periodics in Elliptic Billiards
https://dan-reznik.github.io/Elliptical-Billiards-Triangular-Orbits/
3 stars 1 forks source link

slickr tips #1

Open yonicd opened 4 years ago

yonicd commented 4 years ago

very nice use of slickR!

for the heavier carousels you can use the lazy loading option. that will alleviate the pressure off the html.

last comment in the details block.

https://metrumresearchgroup.github.io/slickR/reference/slickR.html#details

yonicd commented 4 years ago

I also think you meant in the envelope child to use these settings. The autoplay has to be TRUE for the speed to be used.

slickR::settings(autoplay = TRUE, autoplaySpeed = 100, fade = TRUE, adaptiveHeight = TRUE)

dan-reznik commented 4 years ago

Hi Yoni

I set am now using

slickR( <<... large set of png's...>, height=553, width = 800, slideType = 'img-lazy') + slickR::settings(fade=T,adaptiveHeight=T,lazyLoad = 'ondemand')

However the size of my html is still enormous, is bringing in all pictures. Should I use perhaps URLs instead of filenames above?

Dan

On Fri, Feb 28, 2020 at 1:16 PM yonicd notifications@github.com wrote:

I also think you meant in the envelope child to use these settings. The autoplay has to be TRUE for the speed to be used.

slickR::settings(autoplay = TRUE, autoplaySpeed = 100, fade = TRUE, adaptiveHeight = TRUE)

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/dan-reznik/Elliptical-Billiards-Triangular-Orbits/issues/1?email_source=notifications&email_token=AD32VFVWEYPJGXN2RTZQVJ3RFE2GJA5CNFSM4K5S76C2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOENJCBBA#issuecomment-592584836, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD32VFXDQIQLQEC3ELDBYIDRFE2GJANCNFSM4K5S76CQ .

yonicd commented 4 years ago

yes. that would be much lighter, and i think that lazyload works with urls and not embedded.

yonicd commented 4 years ago

also try letting height be set internally and set width to "95%". that may get the sizing to react better

dan-reznik commented 4 years ago

but the question is -- what can i do so rmarkdown doesn't embed the images (encoded in ASCII) into the output html? Right now the .html contains all images and its size is 50 Mb!

Dan

On Fri, Feb 28, 2020 at 3:25 PM yonicd notifications@github.com wrote:

yes. that would be much lighter

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/dan-reznik/Elliptical-Billiards-Triangular-Orbits/issues/1?email_source=notifications&email_token=AD32VFS6FUCVGCMMQBZ32R3RFFJJPA5CNFSM4K5S76C2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOENJU4GI#issuecomment-592662041, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD32VFUTU55ENKYAMP25OKDRFFJJPANCNFSM4K5S76CQ .

yonicd commented 4 years ago

rmarkdown embeds on default. i went down that rabbit hole a while back. if you pass in url's it still forces an embed?

i use urls in the basics vignette of slickr and the size is not inflated. i have a ton of image calls in that file.

yonicd commented 4 years ago

If the images (not in slickr) are local you could set embed to false and the html should link to the images i think. Here is a link in SO explaining how to do it. https://stackoverflow.com/questions/14870589/knitr-r-how-not-to-embed-images-in-the-html-file

dan-reznik commented 4 years ago

no, passing in the URL solved the problem! the tricky thing is for the svgs to be out on the server already else you can't knit it

thanks so much!

one last thing: in my page several slickR carousels are behind "tabsets" -- any idea on how to make them not look empty when I first select the tabset? I.e., some JS trick to preinitialize them?

Dan

On Fri, Feb 28, 2020 at 4:48 PM yonicd notifications@github.com wrote:

rmarkdown embeds on default. i went down that rabbit hole a while back. if you pass in url's it still forces an embed?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/dan-reznik/Elliptical-Billiards-Triangular-Orbits/issues/1?email_source=notifications&email_token=AD32VFRJ52MNA2MWCWXKG73RFFTCRA5CNFSM4K5S76C2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOENJ5LII#issuecomment-592696737, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD32VFR5NHWDLXPVJ25LQGTRFFTCRANCNFSM4K5S76CQ .

yonicd commented 4 years ago

hmmm not sure. maybe @colinfay may know a trick for that

yonicd commented 4 years ago

i would though still replace speed with autoplay = TRUE, autoplaySpeed = 100. I dont think speed actually does anything, at least in the html you have with the carousels they are not moving. if it is autoplaying that may get the slick to activate when you move tabs

dan-reznik commented 4 years ago

when you are not in "autoplay" speed regulates how fast you can jump from one slide to the other

Dan

On Fri, Feb 28, 2020 at 8:12 PM yonicd notifications@github.com wrote:

i would though still replace speed with autoplay = TRUE, autoplaySpeed =

  1. I dont think speed actually does anything, at least in the html you have with the carousels they are not moving. if it is autiplaying that may get the slick to activate when you move tabs

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/dan-reznik/Elliptical-Billiards-Triangular-Orbits/issues/1?email_source=notifications&email_token=AD32VFRU54CYR5X2QJEX5YDRFGK5TA5CNFSM4K5S76C2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOENKPUDA#issuecomment-592771596, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD32VFRO3C45UXGVZODBWWLRFGK5TANCNFSM4K5S76CQ .

yonicd commented 4 years ago

you read the manual better than me :)