Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

$ScaleSize Does not work correctly #246

Closed
fasnet opened this issue Nov 12, 2018 · 1 comment
Closed

$ScaleSize Does not work correctly #246

fasnet opened this issue Nov 12, 2018 · 1 comment

Comments

@fasnet
Copy link

fasnet commented Nov 12, 2018

Hi! I have a task. It is necessary to adapt the slider for different resolutions. Found the $ScaleSize method, but it does not work properly. The width and height change correctly from the parent block id= "jssor_1", the direct descendant, but then it works out is not true. Although lines 1 and 2 are the same. Has anyone encountered such a problem? And is there access to a non-minified script? Sorry for my English!
image

@jssor
Copy link
Owner

jssor commented Nov 15, 2018

The logic is correct.
As jssor slider will always keep aspect ratio, I noticed the height is still 400px after scale, some area bleed outside.
For your case, I think the $ScaleWidth is closer to your approach.

Btw, you can try the parameter maxBleeding (from 0% to 100%), it means how much allowed to bleed outside.
default value is 1 (100%).

jssor_slider_instance.$ScaleHeight(width, height, 0); //0% allowed to bleed outside, all keeps inside
jssor_slider_instance.$ScaleHeight(width, height, 1); //100% allowed to bleed outside, allows up to 100% to bleed outside

@jssor jssor closed this as completed Nov 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants