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

when the width is in percent, it doens't work well #113

Closed
hyoseon-kim opened this issue Jun 18, 2018 · 2 comments
Closed

when the width is in percent, it doens't work well #113

hyoseon-kim opened this issue Jun 18, 2018 · 2 comments
Labels
🔖2.x v2.x~ related issue 🐛Bug Bugs
Milestone

Comments

@hyoseon-kim
Copy link

Description

When the upper element of flicking elements has width in percent, the width of each sub-panel is sometimes genreated in decimal point.
In this case, the image of the former flicking area doesn't go over well. so some part of the image remains like below example.
image
As you can see, the left side of that image remains. Follwing images will explain the reason.
image
When I try to flick to the left, that will be "translate(-734px, 0px)". but we expect "translate(-734.326px, 0px)". so we modified some of eg.js code, and it worked well.

  1. modify flick-container's translate > from parseInt to parseFloat.
  • _getUnitValue
    return (parseFloat(val, 10) || 0) + (String(val).match(rx) || "px");
  1. modify flick-panel's initial tranlate value > from percent to px (It was selected by "SUPPORT_TRANSFORM")
  • _applyPanelsCss
    var coords = this._getDataByDirection([(this._conf.panel.size * i) + "px", 0]);

please review this corrections.

Steps to check or reproduce

@netil netil self-assigned this Jun 25, 2018
@netil netil added the 🐛Bug Bugs label Jun 25, 2018
@netil
Copy link
Member

netil commented Jun 25, 2018

Hi @hyoseon-kim, thanks for the detailed report.
I'll try fix this on next release.

netil added a commit to netil/egjs-flicking that referenced this issue Jul 10, 2018
- Modified some webpack related modules
- Update on banner
- Update dependencies to the latest

Ref naver#114
Ref naver#113
Ref naver#112
Ref naver#111
Ref naver#110
@netil netil closed this as completed in cd17971 Jul 10, 2018
@netil netil reopened this Jul 10, 2018
netil added a commit to netil/egjs-flicking that referenced this issue Jul 10, 2018
- Implement useTranslate
- Change the panel's computation unit from integer to float

Ref naver#113
netil added a commit to netil/egjs-flicking that referenced this issue Jul 10, 2018
- Implement useTranslate
- Change the panel's computation unit from integer to float

Ref naver#113
@netil netil closed this as completed in 37ddf98 Jul 10, 2018
@netil
Copy link
Member

netil commented Jul 10, 2018

The internal panel's dimension will be treated in float instead the integer.

And will be added new useTranslate option, which let opt how to move panels.

  • true: will use transform:translate
  • false: will use top and left property

@netil netil added this to the 2.4.0 milestone Jul 10, 2018
@WoodNeck WoodNeck removed the 🔖2.x v2.x~ related issue label Jun 21, 2019
@WoodNeck WoodNeck added 🔖2.x v2.x~ related issue and removed 🔖2.x v2.x~ related issue labels Jun 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔖2.x v2.x~ related issue 🐛Bug Bugs
Projects
None yet
Development

No branches or pull requests

3 participants