Releases: panoply/relapse
v0.9.1
Relapse v0.9.1
Changes
- Wait until action has been taken before applying
style=""
properties. - Confirm instance exists before triggering
relapse.reinit()
Breaking
- The
openCount
instance reference has been renamed toopened
Fixes
- Fixed the auto-collapsing bug occurring on last known folds when both
persist
andmultiple
were set totrue
.
Added new config
method
Relapse now provides live reconfiguration alignments. Instances have access to an additional config()
method which can be used for updating options on an existing relapse instance. When using this method, the current instance will adhere to new settings in real-time.
Refer to the Methods API for a more detailed breakdown.
import relapse from 'relapse';
const instance = relapse('#example', {
multiple: true, // we allow for multiple folds to be opened
persist: false // we do not require a single fold to persist
});
// Using the config method and passing the following would
// result in all expanded folds to be closed as we set multiple to false
// and because we set persist to true, all but 1 fold will collapse.
//
instance.config({
multiple: false,
persist: true
})
v0.9.0
v0.8.1
v0.8.0
Relapse v0.8.0
Release ships with some minor enhancements that extend the existing API.
Fixed auto-typed import
In v0.7.0 the module would use an upcase import within TypeScript environment, the lowercase relapse
will now apply.
Smaller Distribution bundle
Relapse is now 2.5kb gzip with saving of 0.2kb - It is unlikely it will get smaller.
Allow element
to be reset on instances
Previously, an instance would provide the element
as a getter. This version allows for the element
key to be reset.
Incrementally apply attribute annotation
This helps limit the amount of operations relapse will carry out. If attributes exist pertaining to A11y logic then relapse will not reset them. Mostly an internal minor patch.
Added reinit()
method
Given the way Relapse is designed, sometimes it be preferred to reinitialize an existing instance. The reinit
method can provide this functionality and is available to all instances with an additional global method provided.
import relapse from 'relapse';
// GLOBAL METHODS
relapse.reinit() // Reinit all active instances
relapse.reinit('id') // Reinit an instance by id
relapse.reinit(['foo', 'bar']) // Reinit the following instances only
// INSTANCE METHOD
const demo = relapse(); // Create an instance
...
demo.reinit(); // Reinit the instance