When setting Config.passages.transitionOut to a string, outgoing passages are not removed. I'm not sure if this issue is related to my browser, but I've only tested this on Chrome.
Steps to reproduce the behavior:
Add Config.passages.transitionOut = 'opacity'; to Story JavaScript.
Add the CSS code example (the one that has transition) for Config.passages.transitionOut in the docs.
if (typeof Config.passages.transitionOut === 'string') {
$outgoing.on(Has.transitionEndEvent, ev => {
if (ev.propertyName === Config.passages.transitionOut) {
$outgoing.remove();
}
});
}
I decided to console log this event by adding the following to my Story JavaScript.
$(document).on(':passagerender', () => {
$('.passage').on(Has.transitionEndEvent, ev => console.log(ev) );
});
As seen above, propertyName is not a property of the event object, but rather a property of the event object's originalEvent property object.
Possible fix is to change the condition in the engine's code from ev.propertyName === Config.passages.transitionOut to (ev.propertyName ?? ev.originalEvent?.propertyName) === Config.passages.transitionOut.
When setting
Config.passages.transitionOut
to a string, outgoing passages are not removed. I'm not sure if this issue is related to my browser, but I've only tested this on Chrome.Steps to reproduce the behavior:
Config.passages.transitionOut = 'opacity';
to Story JavaScript.Config.passages.transitionOut
in the docs.When looking through the engine's code for outgoing passages, I found this snippet:
I decided to console log this event by adding the following to my Story JavaScript.
As seen above,
propertyName
is not a property of the event object, but rather a property of the event object'soriginalEvent
property object.Possible fix is to change the condition in the engine's code from
ev.propertyName === Config.passages.transitionOut
to(ev.propertyName ?? ev.originalEvent?.propertyName) === Config.passages.transitionOut
.