英文:
Avoid observable dom listener
问题
我正在尝试使用http://reactivex.io/来构建一个JAVA应用程序。
关于io.reactivex.Observable;
我有两个Observables,其中一个是复选框更改事件类型,另一个是mousemove以捕获坐标。
我希望将这两个Observables合并为一个Observable,然后调用subscribe来记录坐标(已完成)。
我的问题是,我希望在复选框被选中后再添加mousemove Observable的DOM侦听器。
我该如何使用Observable操作符来处理这个问题?
谢谢!
英文:
im trying to build an app with http://reactivex.io/ in JAVA
regarding io.reactivex.Observable;
I have two observables, one of them is a checkbox change event type and the other is a mousemove to capture the cordinates.
I want to combine those two in one observable and then call the subscribe to log the cordinates (done).
My problem is, I would like to wait to the checkbox to be checked in order to add the dom listener of the mousemove observable.
How can i handle this with the observable operators?
Thanks!
专注分享java语言的经验与见解,让所有开发者获益!
评论