Fix bug in non-true-color code

There was a bug caused by 38781d931e
which prevented color map look-ups sent by rfb.js from working properly,
since display.js expected a single-item array, and rfb.js sent just them
item value itself (a number) instead.  This fixes that, and tweaks the
corresponding test to match that behavior.
This commit is contained in:
Solly Ross
2015-08-24 19:34:30 -04:00
parent bb180145c6
commit a369a80c24
2 changed files with 4 additions and 4 deletions
+3 -3
View File
@@ -353,9 +353,9 @@ describe('Display/Canvas Helper', function () {
it('should support drawing solid colors with color maps', function () {
display._true_color = false;
display.set_colourMap({ 0: [0xff, 0, 0], 1: [0, 0xff, 0] });
display.fillRect(0, 0, 4, 4, [1]);
display.fillRect(0, 0, 2, 2, [0]);
display.fillRect(2, 2, 2, 2, [0]);
display.fillRect(0, 0, 4, 4, 1);
display.fillRect(0, 0, 2, 2, 0);
display.fillRect(2, 2, 2, 2, 0);
expect(display).to.have.displayed(checked_data);
});