Skip to content
Snippets Groups Projects
Commit 54194aa0 authored by svornost's avatar svornost
Browse files

Build slave description dialog shell as DOM to avoid unnecessary SC parser calls.

parent e2eac8c7
No related branches found
No related tags found
No related merge requests found
......@@ -278,8 +278,9 @@ App.UI._showDescriptionDialog = function(slave) {
const oldActiveSlave = V.activeSlave;
V.activeSlave = slave;
Dialog.setup(SlaveFullName(slave));
const image = V.seeImages ? `<div class="imageRef medImg"><<= SlaveArt($activeSlave, 2, 0)>></div>` : ``;
Dialog.wiki(`${image}<<include "Long Slave Description">>`);
const image = App.UI.DOM.makeElement("div", App.Art.SlaveArtElement(slave, 2, 0), ["imageRef", "medImg"]);
const lsd = App.UI.DOM.renderPassage("Long Slave Description");
Dialog.append(image).append(lsd);
Dialog.open();
V.activeSlave = oldActiveSlave;
V.eventDescription = oldEventDescription;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment