};
}
+ function onresize() {
+ clear();
+ create();
+ show(false);
+ }
+
function clear() {
var i, j, doc, e;
for (i = 0; i < docs.length; i++) {
/* the api */
return {
- init: function init(mode, keepOpen, maxHints, hintKeys, followLast, hintNumSameLength) {
+ init: function(mode, keepOpen, maxHints, hintKeys, followLast, hintNumSameLength) {
var prop,
/* holds the xpaths for the different modes */
xpathmap = {
}
}
+ window.addEventListener("resize", onresize, true);
+ window.addEventListener("scroll", onresize, false);
+
create();
return show(true);
},
- filter: function filter(text) {
+ filter: function(text) {
/* remove previously set hint-keys filters to make the filter */
/* easier to understand for the users */
filterKeys = "";
filterText = text || "";
return show(true);
},
- update: function update(n) {
+ update: function(n) {
var pos,
keys = config.hintKeys;
/* delete last hint-keys filter digit */
}
return "ERROR:";
},
- clear: clear,
+ clear: function() {
+ clear();
+ if (window) {
+ window.removeEventListener("resize", onresize, true);
+ window.removeEventListener("scroll", onresize, false);
+ }
+ },
fire: fire,
focus: focus,
};