Open eguneys opened 4 years ago
I have this stream by using Bacon.when
let esDrags = Bacon.when( [dDraw.esDrags, revents.drags, _ => _], [dStacks.drags, revents.drags, _ => ({ stack: 'stack' + _.initial, ..._ })], [revents.drags, _ => ({ stack: 'event' + _.initial, ..._ })] ); //dStacks.drags.onValue(); esDrags.map(_ => _.stack).log(); // These streams are like: revents.drags = Bacon.fromEvent(document, 'mousemove'); dStacks.drags = revents.drags.filter(whereDragIsInBounds);
The problem is esDrags emits two events that happen simultaneously one from dStacks.drags one from revents.drags. The weird thing is if I uncomment the line dStacks.drags.onValue the problem dissapears and I see correct behaviour.
esDrags
dStacks.drags
revents.drags
dStacks.drags.onValue
I couldn't reproduce the issue here: https://jsfiddle.net/bwgv97tn/ My project is at https://github.com/eguneys/tapper/tree/bacon
I have this stream by using Bacon.when
The problem is
esDrags
emits two events that happen simultaneously one fromdStacks.drags
one fromrevents.drags
. The weird thing is if I uncomment the linedStacks.drags.onValue
the problem dissapears and I see correct behaviour.I couldn't reproduce the issue here: https://jsfiddle.net/bwgv97tn/ My project is at https://github.com/eguneys/tapper/tree/bacon