Open hiiamboris opened 4 years ago
After the changes made by on-deep-fixes
branch, pair individual component setting will trigger a on-change
reaction (and no more on-deep-change
). That was necessary as the deep change handler is really meant for series. OTOH, the value change handler spec does not allow to pass the information about which component was changed. So I think that the on-change
spec should be extended to pass the value's component name, when applicable.
Like on-change [subject [word! path!] old [any-type!] new [any-type!]]
?
That's one option, another one is just to add an extra field [word! none!]
argument.
I find it often a case where a reaction should be only placed on
x
ory
coordinate of face'soffset
,size
or custom pair dimension.However, reactivity does not provide this flexibility: place a reaction on
/x
and it will be triggered by a change in/y
. (Not just reactivity,on-deep-change
does not provide this info either)Not only this produces unneeded reactions, but also prevents one from creating flexible resize scenarios, e.g. what if I want to set
/y
to a default, but only if it wasn't explicitly set to another value?Output: