react-component / tween-one

Animate One React Element
https://tween-one.vercel.app/
MIT License
380 stars 30 forks source link

Minus start position problem in Safari #11

Closed adamwuyu closed 8 years ago

adamwuyu commented 8 years ago

If the tween-one component's animation start position is a minus value. Then in the latest Safari (both Mac and iPhone), the animation will start from position 0.

jljsj33 commented 8 years ago

safari 9.1.2, No problem...please provide the error code and safari version.

adamwuyu commented 8 years ago

Safari version: 9.1.1 (11601.6.17)

Main idea: I was making a full page scroll (vertical scroll for example). The container is full screen sized, and "overflow: 'hidden'". And the sliders in the container move up or down. Tween One was used for the moving of the sliders.

Error code: Download from here: https://pan.baidu.com/s/1hs9EE8G

There are 3 components: FullpageDemo - a wrapper only Fullpage - The main component Slide - The slider component

jljsj33 commented 8 years ago

scrollAnim???

Error code could not download

adamwuyu commented 8 years ago

@jljsj33 Nice suggestion. I really wish I noticed this component earlier, thus I didn't have to create my own component + my own animation function. Thank you for your suggestion.

jljsj33 commented 8 years ago

Pay attention to ant motion. There may be a need for you.

jljsj33 commented 8 years ago

谷哥翻译看着蛋疼死了。。会中文吗???你上面的问题。我们百度网盘被封了。。。你直接把代码帖出来可以不。。。

adamwuyu commented 8 years ago

好的,切换成中文模式。其实我试了下在这里贴代码,但reander()中的html标签真的会被当成html标签。。。我放到服务器下载吧:http://www.ewings.cc/tween_one_demo.zip

PS:scrollAnim我仔细看了下,主要是针对滚动条的响应。跟我需要的H5全屏滚动效果还不太一样,以后也许会用到。

adamwuyu commented 8 years ago

配置好路径,能运行之后。你点击按钮切换到第5页,然后点击切换到第4页,就会看到动画不是从第5页过渡到第4页,而是:5-》1-》4。我试过在动画开始前重置位置,不管用。

jljsj33 commented 8 years ago

是个坑。。额。。。单位没转

adamwuyu commented 8 years ago

我记得代码里用的都是百分比啊

jljsj33 commented 8 years ago

底层里的 getComputedStyle, 都转成 px 了的, safari 里没转

jljsj33 commented 8 years ago

等会,,我搞下。。。

adamwuyu commented 8 years ago

哦,那还真是个坑,辛苦了~

jljsj33 commented 8 years ago

0.8.3