From 3f76094c554c23ee3519f41458a04d348f4f75a3 Mon Sep 17 00:00:00 2001 From: Florrie Date: Sun, 15 Sep 2019 16:55:53 -0300 Subject: (!!) Only render when draw-dependency props change This is a very large change and probably breaks most applications not built to work with it. (Obviously, I'm not really being that responsible with this sort of thing.) I've tested with mtui and it works fine, but some elements may need tweaks before being 100% adjusted to the new scheduled-render system we're using with this commit. Also, any elements which have custom draw behavior will likely need updating so that they appropriately schedule renders. --- ui/form/Form.js | 3 +++ ui/form/TextInput.js | 3 +++ 2 files changed, 6 insertions(+) (limited to 'ui/form') diff --git a/ui/form/Form.js b/ui/form/Form.js index 3c59cf5..74a1065 100644 --- a/ui/form/Form.js +++ b/ui/form/Form.js @@ -122,4 +122,7 @@ module.exports = class Form extends FocusElement { this.updateSelectedElement() } } + + get curIndex() { return this.getDep('curIndex') } + set curIndex(v) { return this.setDep('curIndex', v) } } diff --git a/ui/form/TextInput.js b/ui/form/TextInput.js index 08bbbb6..78d3b6d 100644 --- a/ui/form/TextInput.js +++ b/ui/form/TextInput.js @@ -139,4 +139,7 @@ module.exports = class TextInput extends FocusElement { this.scrollChars-- } } + + get value() { return this.getDep('value') } + set value(v) { return this.setDep('value', v) } } -- cgit 1.3.0-6-gf8a5