You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When sending multimedia elements to a GoldenLayout webclient pane they always get appended to existing content, even if the update method of the pane is defined as "replace".
To Reproduce
Steps to reproduce the behavior:
Define a new GoldenLayout pane, with the updateMethod of the componentState set to replace, for example:
As a work-around I added a few lines to the multimedia plugin:
let multimedia_plugin = (function () {
//
var image = function (args, kwargs) {
let options = window.options;
if( !("mm_image" in options) || options["mm_image"] === false ) { return; }
var mwins = window.plugins["goldenlayout"].routeMessage(args, kwargs);
mwins.forEach( function (mwin) {
// Lyrewyn
// Check the defined updatemethod for the appropiate action.
let updateMethod = mwin.attr("updateMethod");
if ( updateMethod === "replace" ) {
mwin.html("<img src='"+ args[0] +"'/>");
} else {
mwin.append("<img src='"+ args[0] +"'/>");
}
//
mwin.scrollTop(mwin[0].scrollHeight);
});
}
The text was updated successfully, but these errors were encountered:
nyweryl
added
bug
An actual error or unwanted behavior.
needs-triage
Yet to be looked at and verified as an a real issue/feature that could be worked on
labels
Oct 30, 2023
Griatch
added
web
This issue is website or webclient related.
and removed
needs-triage
Yet to be looked at and verified as an a real issue/feature that could be worked on
labels
Nov 26, 2023
Describe the bug
When sending multimedia elements to a GoldenLayout webclient pane they always get appended to existing content, even if the update method of the pane is defined as "replace".
To Reproduce
Steps to reproduce the behavior:
updateMethod
of thecomponentState
set toreplace
, for example:Expected behavior
I expect the existing contents of the pane to be completely replaced by the multimedia content.
Environment, Evennia version, OS etc
Additional context
As a work-around I added a few lines to the multimedia plugin:
The text was updated successfully, but these errors were encountered: