mirror of
https://github.com/danbulant/node-x11
synced 2026-05-19 04:18:35 +00:00
Handle cases where depths appear multiple times
This commit is contained in:
parent
44f9982495
commit
7ed7e896e1
1 changed files with 8 additions and 1 deletions
|
|
@ -46,7 +46,14 @@ function readDepths(bl, display, depths, n_depths, cb)
|
|||
var visuals = {};
|
||||
readVisuals(bl, visuals, n_visuals, function()
|
||||
{
|
||||
depths[dep] = visuals;
|
||||
if (dep in depths) {
|
||||
for (var visual in visuals) {
|
||||
depths[dep][visual] = visuals[visual];
|
||||
}
|
||||
n_depths--;
|
||||
} else {
|
||||
depths[dep] = visuals;
|
||||
}
|
||||
if (Object.keys(depths).length == n_depths)
|
||||
cb();
|
||||
else
|
||||
|
|
|
|||
Loading…
Reference in a new issue