Thanks Matt, but I don't think I completely understand.
I have to use Adapt.drawer.addItem to add my extension to the drawer, right? Adapt.drawer.triggerCustomView does not add my extension to the drawer.
Adapt.drawer.triggerCustomView is used to open a new "page" in the drawer, right? Like what the resource extension does, but we don't need this new "page".
We are trying to make a studylist that pops in an overlay page, when the user clicks the studylist-button in the drawer. We have already created popup studylist as its own div overlaying the entire Adapt course and the only thing we want the drawer button to do, is to show this div-element when clicked.
So clicking the studylist-button in the drawer should:
1. close the drawer
2. show the div-element
The problem we have, is that when the user opens the studylist, it calls Adapt.trigger('drawer:closeDrawer'); which works fine when there are more than one extension using the drawer. However when only the studylist extension is using the drawer clicking the drawer-btn results in the shadow staying visible and not disappearing.
Here are the two scenarios mentioned as links, as I don't know how to explain it. The first link link where it works and the other where it doesn't.
https://web.moch.dk/hta/adaptforum-studylist/working/index.html
https://web.moch.dk/hta/adaptforum-studylist/notWorking/index.html