famo.us

Famous: Swipe items within a Scrollview

风流意气都作罢 提交于 2019-12-07 07:07:09
问题 I'm looking to implement similar functionality to Mailbox (http://www.mailboxapp.com/) where you can swipe an individual item within a list in order to action it, using Famous (http://famo.us). I tried to add the 'Draggable' modifier to each list item, however it seems that you can't add modifiers to surfaces that are part of a Scrollview. Anyone (from Famous or otherwise) know how I might do this? 回答1: Figured it out. In order to modifiers to surfaces inside a scrollview, they need to be

What is a good way to know when all surfaces had been initially rendered in famo.us?

ぐ巨炮叔叔 提交于 2019-12-06 21:39:30
I would like to be able to know when all views have been rendered in a layout. The reason I want to do this is because I need to be able to reference positions of rendered views in the layout, so that I may animate views relative to other views that had already been rendered. I have read this: Surface render events in famo.us One way I can think of is to count views that have been rendered and after all had been rendered (based on a known count), I can then assume all have been rendered. Obviously this would not work if there's an unknown number of views to render. So another way to achieve

how to make famo.us recalculate sizes?

主宰稳场 提交于 2019-12-06 13:40:33
问题 I have a scrollview i'm inserting divs into. however, the content of these divs are being rendered by javascript templating engine. when famo.us initially creates this page, it seems it calculate the height of the div content to be zero, so the divs in the scrollview all end up being on top of each other. I'm guessing this is because template rendering happens a couple of ticks later.. is there a way to force famo.us to recalculate/reflow its layout? 回答1: I too owe johntraver a beer for his

how to add parallax to a Scrollview?

妖精的绣舞 提交于 2019-12-05 22:27:23
I want to use famo.us standard Scrollview but have a background image which is scrolling at a different speed to give a parallax effect. Rather than setting up timers and getPosition stuff, i was wondering if there's a way to hook into an event stream, or somehow pipe the Scrollviews position into a transformation that's applied to another object? For example use the modifier within the scrollview and a modifier chain and then apply that to another imageSurface? The examples are a bit thin here so would appreciate any pointers. To answer your question, the way to pipe scroll events is to use

Famous: Swipe items within a Scrollview

 ̄綄美尐妖づ 提交于 2019-12-05 16:11:25
I'm looking to implement similar functionality to Mailbox ( http://www.mailboxapp.com/ ) where you can swipe an individual item within a list in order to action it, using Famous ( http://famo.us ). I tried to add the 'Draggable' modifier to each list item, however it seems that you can't add modifiers to surfaces that are part of a Scrollview. Anyone (from Famous or otherwise) know how I might do this? Peter Watts Figured it out. In order to modifiers to surfaces inside a scrollview, they need to be wrapped in a RenderNode. var Engine = require("famous/core/Engine"); var Surface = require(

Animating blur with the famous framework

人盡茶涼 提交于 2019-12-05 11:12:04
问题 Does anyone know what Modifier I would use to animate the blur properties of an item? I'd like to animate from clear to a certain level of blur. Something similar to: .blur-out { -webkit-filter: blur(8px); -webkit-transform: scale(1.1, 1.1); opacity: 0.25; -webkit-transition: all 0.25s ease-out; transition: all 0.25s ease-out; } .blur-in { -webkit-filter: blur(0px); -webkit-transform: scale(1.0, 1.0); opacity: 1.0; -webkit-transition: all 0.25s ease-in; transition: all 0.25s ease-in; } I

famous: scrollview within scrollview

痞子三分冷 提交于 2019-12-05 04:09:39
问题 I'm trying to create a layout (using famous.js) similar to the BBC News native app; a vertical ScrollView, within which are numerous horizontal ScrollViews. I've got both 'working' to the extent that everything renders and the horizontal scrollers work perfectly. My issue is that the vertical scroll event won't fire if the user swipes a surface within a horizontal ScrollView. If i touch an area outside the horizontal scrollers, the vertical scroller will do its job and scroll... vertically

how to make famo.us recalculate sizes?

扶醉桌前 提交于 2019-12-04 18:24:44
I have a scrollview i'm inserting divs into. however, the content of these divs are being rendered by javascript templating engine. when famo.us initially creates this page, it seems it calculate the height of the div content to be zero, so the divs in the scrollview all end up being on top of each other. I'm guessing this is because template rendering happens a couple of ticks later.. is there a way to force famo.us to recalculate/reflow its layout? I too owe johntraver a beer for his excellent answers on famo.us questions here. This is work derived from one of his previous answers, I use it

Scrollview Pull to Refresh Famo.us

感情迁移 提交于 2019-12-04 18:11:31
I'm trying to implement a pull to reload/refresh type effect, that you see in lots of apps, with scrollview. I've got multiple pain points on this. Just stopping a scrollview past where it wants to sit is a pain. Setting velocity or speed limit doesn't work, just setting the position just makes it bounce because it wants to continue back. Then setting up an event call that doesn't just fire when they scroll too hard up while doing their normal browsing. If anyone has thoughts on how to accomplish this I'd appreciate it. If I don't get any responses in a day I'll start posting my specific

Animating blur with the famous framework

偶尔善良 提交于 2019-12-03 21:55:55
Does anyone know what Modifier I would use to animate the blur properties of an item? I'd like to animate from clear to a certain level of blur. Something similar to: .blur-out { -webkit-filter: blur(8px); -webkit-transform: scale(1.1, 1.1); opacity: 0.25; -webkit-transition: all 0.25s ease-out; transition: all 0.25s ease-out; } .blur-in { -webkit-filter: blur(0px); -webkit-transform: scale(1.0, 1.0); opacity: 1.0; -webkit-transition: all 0.25s ease-in; transition: all 0.25s ease-in; } I guess I could always try changing the class on an item to the above, I was just wondering if there was a