-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Allow layer behaviors to "lock" layers on #2717
base: main
Are you sure you want to change the base?
Conversation
8845219
to
5bf75a6
Compare
5bf75a6
to
7082133
Compare
If you want to get the state of a conditionally activated Can you lock on a |
I realised that tracking that is unnecessary for this to work as expected. Rather, if both This also has the effect of allowing the |
I will rewind a bit: I have this momentariness tracking feature which is being used to filter layer change events that aren't "permanent". I am hoping to replace the tracking of momentariness by checking the "locked" state of the highest active layer instead. For that to work:
|
7082133
to
db4659f
Compare
I've added what I believe are the necessary parts to get that to work with the locking system. |
Adds a
locking
property to momentary, to, and toggle layer behaviors. Enabled by default for&to
and&tog
, a layer being "locked" prevents behaviors without thelocking
property from deactivating the layer.Conditional layer activation and deactivation is always non-locking, which seems to interact nicely.
Common use case: with this PR you can place e.g. a
&tog_on 1
or a&to 1
on layer 1, allowing you to "lock" it in place while it is active.PR check-list