« get me outta code hell

Make textAttributes a draw dependency - tui-lib - Pure Node.js library for making visual command-line programs (ala vim, ncdu)
about summary refs log tree commit diff
path: root/ui
diff options
context:
space:
mode:
authorFlorrie <towerofnix@gmail.com>2019-09-23 05:56:02 -0300
committerFlorrie <towerofnix@gmail.com>2019-09-23 05:56:02 -0300
commitfaab576e85baf787c44a67640282ba146a874ef5 (patch)
tree854f07e2ec3203689b7e6b68c01b85e9fc2b908d /ui
parente69d506fdc2d0238cb592256aca5353ecb292816 (diff)
Make textAttributes a draw dependency
Diffstat (limited to 'ui')
-rw-r--r--ui/Label.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/ui/Label.js b/ui/Label.js
index d1b3098..f2cd405 100644
--- a/ui/Label.js
+++ b/ui/Label.js
@@ -44,4 +44,9 @@ module.exports = class Label extends DisplayElement {
   get text() {
     return this.getDep('text')
   }
+
+  // Kinda bad, but works as long as you're overwriting the array instead of
+  // mutating it.
+  set textAttributes(val) { return this.setDep('textAttributes', val) }
+  get textAttributes() { return this.getDep('textAttributes') }
 }