I want to use two vault components on one page.
But, it is not working properly.
You can check that by below sample code.
https://docs.dhtmlx.com/vault/samples/03_usage/01_custom_drop_area.html
Change like this:
<body>
<div class="top-rect-block">
<div class="text-value">You can drop files both to Vault and to another drop area</div>
</div>
<div class="wrapper with-header">
<div id="vault" class="vault-block"></div>
<div id="drophere" class="droparea">
<div class="droparea-text">Drop here</div>
</div>
</div>
<div class="wrapper with-header">
<div id="vault2" class="vault-block"></div>
<div id="drophere2" class="droparea">
<div class="droparea-text">Drop here</div>
</div>
</div>
<script>
var vault = new dhx.Vault("vault", {
uploader: {
target: "/backend/upload"
}
});
vault.uploader.linkDropArea("drophere");
var vault2 = new dhx.Vault("vault2", {
uploader: {
target: "/backend/upload"
}
});
vault2.uploader.linkDropArea("drophere2");
</script>
</body>
Then, only one component(the last one) is working properly.
A file dragged to the first component then the event happened to the 2nd component.
So, I changed my plan to not support drag and drop functionality by setting disable drag and drop entirely.
But, it was not easy too. I can not find any configuration property like “Vault.disableDragAndDrop: true” on API documents.
Please, help me.