How to create a full-screen jssor slider that maximizes but does not crop images? - jssor

I am trying to create a slider that fills the entire screen (desktop and mobile) with the largest possible scaled image -- without cropping. In other words, I want to view a set of photos in their entirely, and have each of them sized to fill all available space without cropping. I expect to see "gray bars" on two sides of most images, unless it happens to fit the screen exactly.
Here's what I have so far:
Start with https://www.jssor.com/demos/full-window-for-pc.slider
click Edit this Slider
Upload two images with varying aspect ratios: one really wide, and one portrait shaped (look in /ajssd).
Choose Layout > Fill Mode > Contain
Choose Layout > Bleeding > 0
Choose Layout > Scale To > Full Window (Constrain Mode)
This is close but not quite. The image that is wide has padding on all four sides, which means it is not rendering as large as possible.
Is it possible to achieve what I want? It needs to work on Desktop and Mobile, and handle browser resizes and orientation changes.

Set Layout > Max Width > 3000
Set Layout > Max Height > 3000

Related

Responsive in Unity 2D

I want my Unity 2d game responsive in all android mobile device. So i anchor 4 canvas to 4 edge (top left, top right, bottom left, bottom right).
But when i change a device, the size of each component is not change. Now i want the size of each component change depend on each resolution of device. What should i do or what tutorial i can follow.
Problem will come when i get small screensize, it like this
Canvas Scaler
You can solve it using Canvas Scaler.
You can find various options in the list in UI Scale Mode.
When selecting the option to fit the commonly used screen size,
If you want to align UI elements to the height, set Match, an element of Screen Math Mode, to Height, and if you want both height and width to match, place it in the center.

Making a panel stretch to the size of the canvas and then back to its previous size like a "maximize" button in Unity

I've figured out how to make the maximize portion of this work using the aspect ratio built in function on a button to scale a panel up to the full size of the screen. Haven't been able to find anywhere how to get it to back down to its previous size.

How to change canvas' size in unity3d

I can not change canvas' size when it's in Screen Space - Overlay Mode; After some research I found that the size of a canvas is determined by your game's screen size. The canvas just covers your screen. So I think I could change my camera's size to change canvas' size. But it does not work. Does anyone know how to set a specific size to a canvas?
So may be my question should be how to change the screen size showed
in editor?
To change the screen size, go to the Game window (accessed by the menu "Window->General->Game"). At the top of the window will be a screen size menu (outlined in green, below) to change the screen size. When pressed, it will display the list of screen sizes that will be emulated. I say "emulated" instead of "displayed" because it is possible to have a screen size larger than the screen on which you are working. It is also possible to zoom into a screen. The "Scale" slider (to the right of the screen size menu) will allow you to scale up/down.
As a note, the list of screens and resolutions shown are related to the current build target (accessed by "File->Build Settings..."). For example, common iOS screen sizes are displayed in the list when the build target is iOS.
Use the Canvas Scaler Component
Unity3D Documentation: Canvas Scaler

How do I set specific y position, width and height without diving into code?

A designer I'm working with wants to have a UIImageView be at a specific y position, with a specific width/height depending on the iphone size. I've done research and I haven't been able to find anything online that allows me to do so with constraints on the story board. I want to avoid having to use code because throughout the rest of the app there are a lot of similar situations. In the past I've made different storyboards for each phone size to accommodate for the specificity our clients request, but I want to avoid doing this because it feels like bad practice. Is this even possible?
This can be completely handled in the Interface Builder. Follow the steps below.
1) Add your UIImageView to the ViewController
2) Set constraints for Width, Height, Vertically Align and Horizontally Align
3) You can adjust the Y position in the Size Inspector of the view.
4) Now switch to Assistant Editor and choose 'Preview' and add different screen sizes to see the auto layout in action.
All of this will set a static image size of 250x200, horizontally centered, and vertically at 1/4 of the screen height.
Little-known capability of constraints are that you can set view positions, or in your case sizes, by way of ratios against other views.
With just your image view selected, the tie-fighter :) constraints button lets you specify absolute positions & sizes: do that to set your desired y-position. But then select both your image view and its enclosing parent view, then the pop up for that same button now enables the equal height/width buttons. Add those constraints and then edit the constraint to change the 1:1 ratio to whatever ratio you need.
Excuse my lack of screenshots, posting from my phone.

Perfect square buttons in Unity3d

I'm trying to create a flexible menu for my mobile project but i'm having trouble with new UI system. I could do this with code but i want to know if it's possible without coding.
Here is what i'm trying to do:
http://i.imgur.com/33yMRgV.jpg
Basically, i want to have a menu area with height of %10 of total screen height. So for example, if it's a HD device, i want height of the red area in the image to be 192 pixel (1920/10). I can do that easily but i also want to have 192x192 buttons aligned on top right corner. I can set the height to parent so it becomes 192 too but i can't set the width to height. I can use ratio fitter to make them squares but i can't place them side by side.
So basically i just want to set width of an element to it's height and puting them side by side without coding. Is it possible?
Thanks
Have a panel inside Canvas, and add horizontal layout group and then add your buttons inside this panel.
Note : You will need to increase the width of the panel more than the canvas in order to have buttons horizontally.