Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for #693, drag and drop will now work in Firefox and Safari #873

Merged
merged 1 commit into from
May 4, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 8 additions & 5 deletions js/src/workspaces/slot.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
init: function () {
this.element = jQuery(this.template({
workspaceSlotCls: this.workspaceSlotCls,
slotID: this.slotId
slotID: this.slotId
}));
this.element.appendTo(this.appendTo);

Expand Down Expand Up @@ -57,7 +57,7 @@
jQuery.publish('HIDE_REMOVE_OBJECT.' + _this.window.id);
}
});

jQuery.subscribe('SHOW_REMOVE_SLOT', function(event) {
_this.element.find('.remove-slot-option').show();
if (_this.window) {
Expand Down Expand Up @@ -132,7 +132,8 @@
var _this = this;

e.preventDefault();
e.originalEvent.dataTransfer.items[0].getAsString(function(url){
var url = e.originalEvent.dataTransfer.getData("text/plain");
if (url) {
var manifestUrl = $.getQueryParams(url).manifest,
canvasId = $.getQueryParams(url).canvas,
imageInfoUrl = $.getQueryParams(url).image,
Expand Down Expand Up @@ -197,8 +198,11 @@

jQuery.publish('ADD_WINDOW', windowConfig);
}
});
});
} else {
_this.element.removeClass('draggedOver');
dropTarget.hide();
}
},

clearSlot: function() {
Expand Down Expand Up @@ -253,4 +257,3 @@
};

}(Mirador));