1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-01-04 19:24:14 +01:00

Speed completion scrolling

This commit is contained in:
Kris Maglione
2008-11-25 01:29:51 +00:00
parent 8de6c9d8df
commit ac2378110d
3 changed files with 69 additions and 45 deletions

View File

@@ -32,7 +32,7 @@ const template = {
return <>{xml}</>;
},
completionRow: function completionRow(context, item, class)
completionRow: function completionRow(item, class)
{
if (typeof icon == "function")
icon = icon();
@@ -43,8 +43,8 @@ const template = {
}
else
{
var text = context.process[0].call(context, item, item.text || context.getKey(item, "text"));
var desc = context.process[1].call(context, item, context.getKey(item, "description"));
var text = this.process[0].call(this, item, item.text || this.getKey(item, "text"));
var desc = this.process[1].call(this, item, this.getKey(item, "description"));
}
return <ul class={class || "hl-CompItem"}>
@@ -195,9 +195,9 @@ const template = {
context.format = format;
return this.generic(
<div class="hl-Completions">
{ this.completionRow(context, context.title, "hl-CompTitle") }
{ this.completionRow(context.title, "hl-CompTitle") }
{
this.map(items, function (item) template.completionRow(context, { text: context.getKey({item: item}, "text"), item: item }))
this.map(items, function (item) template.completionRow.call(context, { text: context.getKey({item: item}, "text"), item: item }))
}
</div>);
},