angular-fullscreen
angular-fullscreen copied to clipboard
Disable Fullscreen on Double Click
HI,
I need to disable fullscreen on double click. We are using below code to display image in fullscreen when user clicks on fullscreen icon.
$scope.goFullScreen = function (id) {
if (Fullscreen.isEnabled() === null || angular.equals(Fullscreen.isEnabled(), undefined)) {
Fullscreen.enable($("#myId" + id)[0]);
} else {
Fullscreen.cancel();
$("#myId" + id).removeClass("fullscreen_IE");
}
};
Now we need to disable fullscreen when user double click on any image, but the below code always executes.
if (navigator.userAgent.indexOf("Firefox") != -1)
{
$element.on('dblclick', function (ev) {
Fullscreen.enable($element[0]); //comment this line because of disable double click fullscreen
});
}else{
$element.on('dblclick', function (ev) {
Fullscreen.enable($element[0]);
});
}
How do I prevent this by either doing changes in my custom function or making a new one. P.S. : I do not want to make any changes in angular-fullscreen.js library.
Thanks.