mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2024-06-07 21:20:49 +00:00
Added missing long press event for tree file items to enable the detail view.
This commit is contained in:
parent
25e516a1d3
commit
e4be1d5aaf
@ -1477,16 +1477,18 @@ function extraNetworksCardOnLongPress(event) {
|
||||
tab.showDetsView(btn);
|
||||
}
|
||||
|
||||
function extraNetworksTreeFileOnClick(event) {
|
||||
// Do not select the row if its child button-row is the target of the event.
|
||||
if (event.target.closest(".tree-list-item-action")) {
|
||||
return;
|
||||
}
|
||||
|
||||
const btn = event.target.closest(".tree-list-item");
|
||||
function extraNetworksTreeFileOnLongPress(event) {
|
||||
const btn = event.target.closest(".tree-list-item--file");
|
||||
const pane = btn.closest(".extra-network-pane");
|
||||
const tab = extra_networks_tabs[pane.dataset.tabnameFull];
|
||||
|
||||
tab.showDetsView(btn);
|
||||
}
|
||||
|
||||
function extraNetworksTreeFileOnClick(event) {
|
||||
const btn = event.target.closest(".tree-list-item");
|
||||
const pane = btn.closest(".extra-network-pane");
|
||||
const tab = extra_networks_tabs[pane.dataset.tabnameFull];
|
||||
|
||||
let checkpoint_name;
|
||||
if ("isCheckpoint" in btn.dataset) {
|
||||
@ -1752,7 +1754,6 @@ function extraNetworksSetupEventDelegators() {
|
||||
}, event_options);
|
||||
|
||||
const click_event_map = {
|
||||
".tree-list-item--file": extraNetworksTreeFileOnClick,
|
||||
".copy-path-button": extraNetworksBtnCopyPathOnClick,
|
||||
".edit-button": extraNetworksBtnEditMetadataOnClick,
|
||||
".metadata-button": extraNetworksBtnShowMetadataOnClick,
|
||||
@ -1791,6 +1792,11 @@ function extraNetworksSetupEventDelegators() {
|
||||
negative: ".tree-list-item-action",
|
||||
handler: extraNetworksTreeDirectoryOnClick,
|
||||
},
|
||||
{
|
||||
selector: ".tree-list-item--file",
|
||||
negative: ".tree-list-item-action",
|
||||
handler: extraNetworksTreeFileOnClick,
|
||||
},
|
||||
{
|
||||
selector: ".extra-network-dirs-view-button",
|
||||
handler: extraNetworksBtnDirsViewItemOnClick,
|
||||
@ -1839,6 +1845,11 @@ function extraNetworksSetupEventDelegators() {
|
||||
negative: ".tree-list-item-action",
|
||||
handler: extraNetworksTreeDirectoryOnLongPress,
|
||||
},
|
||||
{
|
||||
selector: ".tree-list-item--file",
|
||||
negative: ".tree-list-item-action",
|
||||
handler: extraNetworksTreeFileOnLongPress,
|
||||
},
|
||||
{
|
||||
selector: ".extra-network-dirs-view-button",
|
||||
handler: extraNetworksBtnDirsViewItemOnLongPress,
|
||||
|
Loading…
Reference in New Issue
Block a user