perf: More decoration caching

This commit is contained in:
Tom Moor
2022-03-31 19:51:30 -07:00
parent f457bf2019
commit 4c0cd3d893
2 changed files with 23 additions and 11 deletions

View File

@@ -171,11 +171,17 @@ export default class Table extends Node {
if (shadowRight) {
decorations.push(
Decoration.widget(pos + 1, () => {
const shadow = document.createElement("div");
shadow.className = "scrollable-shadow right";
return shadow;
})
Decoration.widget(
pos + 1,
() => {
const shadow = document.createElement("div");
shadow.className = "scrollable-shadow right";
return shadow;
},
{
key: "table-shadow-right",
}
)
);
}
index++;