chrome-extension-imagus icon indicating copy to clipboard operation
chrome-extension-imagus copied to clipboard

Option for caption outside of image

Open MaggiWuerze opened this issue 6 years ago • 8 comments

could you add an option to display the caption UNDER the image. This way it would not obscure the image when wrapped. I managed to do it via chrome dev console simply by setting the following properties of the surrounding div:

  • position: initial <-- instead of absolute so the captions top sticks to the lower edge of the image
  • overflow-y: auto; <-- so very long captions dont leave the screen and get a scrollbar if needed
  • height: fit-content <--| this would need some tinkering or maybe an additional option. i ran with 100px.
  • max-height:???px; <--|

image

image

MaggiWuerze avatar Sep 12 '18 11:09 MaggiWuerze

This I'd love as well. I can take a look at it later. Are you still interested in this @MaggiWuerze ?

DanielBiegler avatar Oct 10 '18 15:10 DanielBiegler

Yeah definitely, i can't live without this extension and this has bugged me for some time. Thanks for looking into it

MaggiWuerze avatar Oct 10 '18 17:10 MaggiWuerze

is there any progress regarding this feature?

MaggiWuerze avatar Jan 23 '19 10:01 MaggiWuerze

Oh hey there, thanks for reminding me. I just spent some time to implement it here: https://github.com/DanielBiegler/chrome-extension-imagus/tree/feature/caption-under-media-with-wordwrap

I guess before this should be merged, the options page should be edited as well. I commited only twice, check it out.

Got to go now, will check it out later.

DanielBiegler avatar Jan 23 '19 11:01 DanielBiegler

really nice, looks good to me. Are you planning to give an option for max-height when you touch the options page??

MaggiWuerze avatar Jan 23 '19 17:01 MaggiWuerze

Yeah one should also keep in mind the options for Captions in the imagus settings. There are options for the position. I hardcoded it to be on the bottom, it would be way better to respect the optionspage. I might check it out later but would be cool if you wanna help out.

DanielBiegler avatar Jan 26 '19 13:01 DanielBiegler

i'll have a look at how it could be positioned

MaggiWuerze avatar Feb 06 '19 09:02 MaggiWuerze

ok, it seems if you just switch the order of the <img> and the <div> containing the caption when the caption should be displayed on top and set the captions position to initial (as you already did) it works pretty flawless

MaggiWuerze avatar Feb 06 '19 09:02 MaggiWuerze