Add corpusByMatch fragment to VC builder (Issue #27)
Change-Id: I3c7ecb434572412203bb6055b4ce8f2947975306
diff --git a/dev/js/src/init.js b/dev/js/src/init.js
index e2d89b9..34a838a 100644
--- a/dev/js/src/init.js
+++ b/dev/js/src/init.js
@@ -263,19 +263,19 @@
vc.onOpen = function () {
vcname.classList.add('active');
+
+ var view = d.getElementById('vc-view');
+ if (!view.firstChild)
+ view.appendChild(this.element());
+
show['collection'] = true;
};
var vcclick = function () {
-
if (vc.isOpen()) {
vc.minimize()
}
else {
- var view = d.getElementById('vc-view');
- if (!view.firstChild)
- view.appendChild(vc.element());
-
vc.open();
};
};