Skip to content

Commit

Permalink
Fixed _M2
Browse files Browse the repository at this point in the history
  • Loading branch information
jazz-soft committed Aug 17, 2023
1 parent b4ecb4b commit ef18693
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
3 changes: 3 additions & 0 deletions javascript/JZZ.js
Original file line number Diff line number Diff line change
Expand Up @@ -529,6 +529,9 @@
if (!m._stamped(this._outs[i])) this._outs[i].send(m._stamp(this));
}
};
_M2.prototype.connect = _M.prototype.connect;
_M2.prototype.disconnect = _M.prototype.disconnect;
_M2.prototype.connected = _M.prototype.connected;

// _W: Watcher object ~ MIDIAccess.onstatechange
function _W() {
Expand Down
11 changes: 5 additions & 6 deletions test/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -1268,13 +1268,12 @@ describe('JZZ.Widget', function() {
});

describe('JZZ.Widget2', function() {
it('connect', function(done) {
var port1 = JZZ.Widget2({ _receive: function(msg) { this._emit(msg); done(); }});
it('noop', function(done) {
var sample = new test.Sample(done, [[0, 0, 0, 0]]);
var port1 = JZZ.Widget2();
var port2 = JZZ.Widget2();
var port3 = JZZ.Widget2();
//port1.connect(port2);
//port2.connect(port3);
//port3.connect(port1);
port1.connect(port2);
port2.connect(function(msg) { sample.compare(msg); });
port1.noop();
});
});
Expand Down

0 comments on commit ef18693

Please sign in to comment.