forked from GitHub-Mirrors/foundry-sw5e
fixed inventory and favorites dragging to macro bar
This commit is contained in:
parent
e481098c98
commit
601cbd1a69
2 changed files with 10 additions and 3 deletions
|
@ -516,7 +516,7 @@ async function addFavorites(app, html, data) {
|
|||
|
||||
if (app.options.editable) {
|
||||
favtabHtml.find('.item-image').click(ev => app._onItemRoll(ev));
|
||||
let handler = ev => app._onDragItemStart(ev);
|
||||
let handler = ev => app._onDragStart(ev);
|
||||
favtabHtml.find('.item').each((i, li) => {
|
||||
if (li.classList.contains("inventory-header")) return;
|
||||
li.setAttribute("draggable", true);
|
||||
|
@ -566,7 +566,14 @@ async function addFavorites(app, html, data) {
|
|||
});
|
||||
}
|
||||
tabContainer.append(favtabHtml);
|
||||
|
||||
// if(app.options.editable) {
|
||||
// let handler = ev => app._onDragItemStart(ev);
|
||||
// tabContainer.find('.item').each((i, li) => {
|
||||
// if (li.classList.contains("inventory-header")) return;
|
||||
// li.setAttribute("draggable", true);
|
||||
// li.addEventListener("dragstart", handler, false);
|
||||
// });
|
||||
//}
|
||||
// try {
|
||||
// if (game.modules.get("betterrolls5e") && game.modules.get("betterrolls5e").active) BetterRolls.addItemContent(app.object, favtabHtml, ".item .item-name h4", ".item-properties", ".item > .rollable div");
|
||||
// }
|
||||
|
|
|
@ -55,7 +55,7 @@
|
|||
</a>
|
||||
{{/if}}
|
||||
</div>
|
||||
<ol class="group-items">
|
||||
<ol class="group-items item-list">
|
||||
{{#each section.items as |item iid|}}
|
||||
<li class="item group-grid-inventory" data-item-id="{{item._id}}">
|
||||
<div class="item-name rollable">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue