jssor thumbnail scrolling with different thumbnail width - jssor

I would like to use the jssor Thumbnail (logo) scroller with images (thumbnails) of different size.
I cannot found where I can modify the settings.
Can anyone help me?

Every slide in jssor slider is in fixed size. What you can do is to specify $FillMode option to fit your image in each slide.
var options = {
...
$FillMode: 0,
...
};
Reference: http://www.jssor.com/development/reference-options.html

Related

Maintain the aspect ratio(Landscape/Portrait) of images clicked by device's camera

Got stuck in a issue with creating responsive slider. I have created slider and it's working fine. What is the issue is I am making slider for images clicked by camera.
There is a button under slider which clicks new image and then store that image in Database using SQLite and then It will fetch that images from Database and add into the slider.
It works fine with Landscape images clicked by camera. I'm getting portrait images clicked in slider but it's stretching the image with the width of slider. I want to know that how to maintain ratio of images in slider as I clicked.
Thank you.
in your jssor slider options change $FillMode:
$FillMode: 1 //1 contain (keep aspect ratio and put all inside slide)
you'll find an example on the official website here: http://jssor.com/demos/different-size-photo-slider.slider

Hide thumbnails in jssor silder

I am using jssor slider .I have a requirement, I used images gallery with thumbnails . When clicked on external button thumbnails should hide and image should align centre in slider and arrows should align left and right to slider.
If you know how to set slider height and width according to window size please help me.
Your slider is made of 'outer container', 'slides' container and 'thumbnail navigator' container. You can adjust layout dynamically.
Refefence: http://www.jssor.com/development/tip-arrange-layout-adjust-size.html
You can scale the slider while window resizes, please note that jssor slider always keeps aspect ratio.
Reference: http://www.jssor.com/development/tip-make-responsive-slider.html

Dynamically change height of slide for jssor

I'm using jssor plugin for slideshow of my content. There is a bunch of configuration options, which is great, but I can't find one for dynamically changing height of slide, and not sure if that is possible at all.
I see that one must specify height and width of outer container, and that slides will take its width and height. But can that be changed on the fly?
Hope the $ScaleHeight api help.
instance.$ScaleHeight(); //Get scaled height
instance.$ScaleHeight(height); //Scale the slider to new height and keep aspect ratio.

Some slides portrait, some landscape - how to get Jssor to display them correctly?

My slides are different sizes, and orientations (some panoramas). I mean all are pics from a photo roll. Nearly all pics are bigger than the viewport in one way or another. I want them to be centered, have a correct aspect ratio, still have touch controls for iPhone, as well as the < > widgets (which go invisible by the way if the image is narrower than the width of the page) for desktop.
I can get full width, by specifying max-width in CSS. Full height is trickier. The "Full Width Slider" demo fixes height at 500px, and trial and error only allows me to change that to another integer number rather than a percentage.
So I'm struggling to tweak the right options, and set the right style/css inline in the HTML. Is there a better demo for me than "Full Width Slider" (http://www.jssor.com/demos/full-width-slider.html)
It'd be great to pinch-zoom into images that are larger than the viewport, but that's secondary to getting my "fit" issues sorted :)
Please set slider size to your screen size, and set $FillMode to 1.
To apply css tricks to set slider size, you can place jssor slider in a wrapper, and then scale the slider to available width of the wrapper.
See,
function ScaleSlider() {
var parentWidth = jssor_slider1.$Elmt.parentNode.clientWidth;
if (parentWidth)
jssor_slider1.$ScaleWidth(parentWidth);
else
$JssorUtils$.$Delay(ScaleSlider, 30);
}
Reference: jssor full height or full screen slider / possible?

Resized Image ( 320x480) is not full screen? What is the full screen size for iPhone?

I'm trying to to resize my image (from URL) to full screen in my iPhone. However, the size 320x480 which is supposed to be full size is not full screen.
-(IBAction)changeFullSize{
urlImage.contentMode = UIViewContentModeScaleAspectFit;
urlImage.frame = CGRectMake(0,0,320,480);
}
I'm using a UIButton here, so when the user clicks on the opaque button, it changes to a full sized image.
However, there is an empty space between the tab bar at the top and the start of the picture.
What is the correct size for full screen? Is there a way for it to automatically resize to full screen without me specifying the width and height?
Thanks.
You could try and get it from self.view.frame.size but for the entire screen you can use [[UIScreen mainScreen] bounds]. Hope this helps.
you cant just resize your image by changing its frame, since you are using aspect fit, the image will keep its original aspect, depending on your needs a simple way would be to change to UIViewContentModeScaleToFill
if scaling to fill does not produce your intended results, you may want to check out trevor's blog post on uiimage categories here
once the UIImage categories are added you can just perform
[youruiimage resizedImage:CGSizeMake(320, 480) interpolationQuality:kCGInterpolationHigh]
using this you can use either UIViewContentModeScaleToFill or UIViewContentModeScaleAspectFit and it should turn out nicely =)
If you have status bar then don't forget to reduce its size from the height.
And also aspect-fit would keep the image in its correct ratio, then consider filling it.
Aspect-fill would keep the image in correct ration + will try to make full screen, no void spaces, chances are some part of image wont be shown.
Scale to fill will keep the image full screen, ratio doesn't matter there.