angular-fullscreen icon indicating copy to clipboard operation
angular-fullscreen copied to clipboard

Disable Fullscreen on Double Click

Open Vikram0811 opened this issue 8 years ago • 0 comments

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.

Vikram0811 avatar Jul 25 '17 09:07 Vikram0811