jcrop show image in modal dialog for cropping size issue - modal-dialog

I am showing the image which is uploaded by user in a modal dialog. On this image I am initializing JCrop for cropping the image.
The problem is that I am not able to set the image properly in the dialog, it works ok for images whose size (dimensions) is less than dialog size but for images bigger than dialog size, the image is going out of the dialog.
I tried using boxHeight and boxWidth but this make image non responsive and for smaller size screen the image is going out the dialog.
Basically I am looking for generic solution of showing image in a dialog no matter the image size so that it is displayed properly inside the dialog.

Use this may help :
<div class="modal-body" style="overflow: auto; >
......preview here ....
</div>

The easiest solution is to initialize jcrop in a fixed size div using jcrop option as follows:
boxWidth: 500,
boxHeight: 500,

Related

Adding custom width hieght if fancybox opened svg image

Im using fancybox popup for images. I want to check if a loaded image is svg then assign custome width height for overwirte actual size of a image.pls advice
Simply use this demo https://codepen.io/fancyapps/pen/rYQogO?editors=1010 (from the docs) as an example. This is how you can check current source - current.src

jssor image width overflowing div container

What does the jssor Javascript base its image width calculations on for the jssor_1 div id?
I am creating a jssor image slider using Blogger Code option (paid subscriber) to copy/paste in my website CMS. Created page here: http://lower-hudson-regional-information-center.echalksites.com/groups/41146/zlorem_ipsum_1/just_slides
In <1300 browser width (and phone sized) responsive modes I observe the image width appears to extend too far on the right overflowing its div container. Screenshot example: screenshot with right edge overflow
Only possible issue I have been able to identify is that something is causing the Jssor Javascript to calculate an image width for the jssor_1 div id that is skewing the display of the slider on the page.
I am hoping a Jssor Javascript and/or CSS guru might lend their expertise in identifying the cause of this issue with using my jssor slider in my website CMS.
You defined padding for the css rule 'social-content'.
Please move jssor slider out from <div class="social-content">

How to customize image size when using blueimp-gallery lightbox?

I'm using http://blueimp.github.io/Gallery/ in a bootstrap environment.
It works with my images but the modal window which shows the full size image is not large enough for me. It takes only one-third of my screen width.
You can see a live-example here:
http://www.randspringer.de/mannschaftsaufstellungen/1.html
How can I customize the size of the displayed full image?
You could either add
data-use-bootstrap-modal="false"
to the lightbox container, which displays the images borderless and fullscreen
or adjust the size of the modal according to the bootstrap documentation:
http://getbootstrap.com/javascript/#modals-sizes

how to display images in UIwebview when they get loaded from net in iPhone?

My content of uiwebview contains images and text. I have the text but the images get loaded from net. If there is no net then symbol of no image comes (the default as it looks in browser). I have seen an application where it left no blank space for images if there is no net. If net is present then the images are inserted between the text.
How can I achieve that.
You can add an onerrorattribute to your images:
<img src="yourimage.png" onerror="this.width=0" />
If the UIWebView cannot load the image (e.g. because there is no internet connection) an error event is dispatched and the javascript inside your onerror attribute gets called. If you set the image's width to 0, the broken image icon is not displayed.

jQuery Mobile/ jqTouch Image width

I want to have a static footer image with 5 buttons for navigation in my mobile phone website. The image is here http://www.pintum.com.au/jm/footer3a.jpg. The blue icons should be the default, the yellow icon should only be visible for the hover or active state.
I want to know how can I make this image scale to the correct width on all mobile devices (landscape and portrait) and have links to other pages and make the current/active pages icon the yellow color?
What I have tried so far
I first tried to make a CSS Sprite but that go ugly (complex) quickly. Painful working with widths everywhere so the image scales correctly as I had no way of knowing the height in pixels since the width is dynamic. I could use JS to find the width and calculate height on the fly. But this sounds like overkill.
Next I tried to have a single image with a width of 100% then place div overlays on top of the image. But with this solution I could not figure out how to navigate pages using JavaScript click event, or figure out how I would be able to change the image icon on the selected page http://jsbin.com/uraya5/3/ . And detrmining the correct height for the div
Last I tried to make each button a seperate image. These seems like the easist soultion. But jQuery Mobile adds a bunch of extra styles to the button I do not know how to remove. See http://jsbin.com/uraya5/4
So whats the best/easiest way to do this?
How can I remove the style around
links?
Or can I use a single image CSS sliding door method? To reduce HTTP request.
Ok I figured it out
See soultion here http://jsbin.com/uraya5/10/
I had to:
Set width to 19% of each button for
some reason there is spacing between
each button so 20% does not work.
Set ui-bar-a background to black so
it hides the spaces between my
images
Use this JS code to navigate pages $.mobile.changePage($("#about"),
"flip", true, true);
I would still like to use a single image instead of having 5 different images to reduce http calls. So if anyone finds a eligant soultion for this please let me know.