function init3dhop() {
	if (isIOS()) jQuery('head').append('<meta name="viewport" content="width=device-width">'); //IOS DEVICES CHECK

	var interval, id, ismousedown;
	var button = 0;

	jQuery('#toolbar img')
		.mouseenter(function(e) {
			id = jQuery(this).attr('id');
			if(!ismousedown) jQuery(this).css("opacity","0.8");
			else jQuery(this).css("opacity","1.0");
		})
		.mouseout(function(e) {
			clearInterval(interval); 
			jQuery(this).css("opacity","0.5");
		})
		.mousedown(function(e) {
			id = jQuery(this).attr('id');
			ismousedown = true;
			if(e.button==button){
				actionsToolbar(id);
				if(id == "zoomin" || id == "zoomout"){
					interval = setInterval(function(){
						actionsToolbar(id);
					}, 100);
				}
				else {
					clearInterval(interval); 
				}
				jQuery(this).css("opacity","1.0");
				button=0;
			}
		})
		.mouseup(function(e) {
			ismousedown = false;
			if(e.button==button){
				clearInterval(interval); 
				jQuery(this).css("opacity","0.8");
				button=0;
			}
		})
		.on('touchstart', function(e) { 
			button=2;
		})
		.on('touchend', function(e) {
			button=0;
		});

	jQuery('.output-table td:has(.output-text,.output-input)').css("border-radius", "5px").css("background-color", "rgba(125,125,125,0.25)");

	jQuery('#3dhop')
		.on('touchstart pointerdown', function(e) {
			jQuery('#toolbar img').css("opacity","0.5");
		})
		.on('touchend pointerup', function(e) {
			clearInterval(interval); 
		})
		.on('touchmove', function(e) {
			clearInterval(interval); 
			jQuery('#toolbar img').css("opacity","0.5");
		});

	jQuery('#3dhop:not(#draw-canvas)').on('contextmenu', function(e) { return false; });

	jQuery('#draw-canvas')
		.on('contextmenu', function(e) {
			if (!isMobile()) return false; //MOBILE DEVICES CHECK
		})
		.on('touchstart pointerdown', function(e) {
			jQuery('#toolbar img').css("opacity","0.5");
		})
		.mousedown(function(e) { 
			jQuery('#toolbar img').css("opacity","0.5"); 
			if(e.preventDefault) e.preventDefault(); 
			if (window.getSelection && window.getSelection()!='') window.getSelection().removeAllRanges();
			else if (document.selection && document.selection.createRange()!='') document.selection.empty();
		});

	jQuery(document).on('MSFullscreenChange mozfullscreenchange webkitfullscreenchange', function(e) { //fullscreen handler 
		if(!document.msFullscreenElement&&!document.mozFullScreen&&!document.webkitIsFullScreen) exitFullscreen();
	});

	if (window.navigator.userAgent.indexOf('Trident/') > 0) { //IE fullscreen handler 
		jQuery('#full').click(function() {enterFullscreen();});
		jQuery('#full_on').click(function() {exitFullscreen();});
	}

	jQuery(window).on('resize', function () {
		if (!presenter._resizable) return;

		var width, height;

		if(document.fullscreenElement || document.mozFullScreenElement || document.webkitFullscreenElement ) {
			width = Math.max(document.documentElement.clientWidth, window.innerWidth);
			height = window.innerHeight;
		}
		else {
			width = jQuery('#3dhop').parent().width();
			height = jQuery('#3dhop').parent().height();
		}

		jQuery('#draw-canvas').attr('width', width);
		jQuery('#draw-canvas').attr('height',height);
		jQuery('#3dhop').css('width', width);
		jQuery('#3dhop').css('height', height);

		presenter.ui.postDrawEvent();
	});

	jQuery('.close').mouseenter( function() {
		jQuery('.close').css("display", "none");
		jQuery('.close_on').css("display", "inline");
	});
	jQuery('.close_on').mouseleave( function() {
		jQuery('.close_on').css("display", "none");
		jQuery('.close').css("display", "inline");
	});

	jQuery('#draw-canvas').attr('width', jQuery('#3dhop').parent().width());
	jQuery('#draw-canvas').attr('height',jQuery('#3dhop').parent().height());
	jQuery('#3dhop').css('width', jQuery('#3dhop').parent().width());
	jQuery('#3dhop').css('height', jQuery('#3dhop').parent().height());

	anchorPanels();

	set3dhlg();
}
/*
3DHOP - 3D Heritage Online Presenter
Copyright (c) 2014-2020, Visual Computing Lab, ISTI - CNR
All rights reserved.

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/
3D Heritage Online Presenter
Copyright (c) 2014-2020, Visual Computing Lab, ISTI - CNR
All rights reserved.

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see .
3D Heritage Online Presenter Copyright ( c ) 2014 - 2020 Visual Computing Lab ISTI - CNR All rights reserved . This program is free software : you can redistribute it and / or modify it under the terms of the GNU General Public License as published by the Free Software Foundation either version 3 of the License or ( at your option ) any later version . This program is distributed in the hope that it will be useful but WITHOUT ANY WARRANTY ; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the GNU General Public License for more details . You should have received a copy of the GNU General Public License along with this program . If not see .
function init3dhop() {
	if (isIOS()) jQuery('head').append('<meta name="viewport" content="width=device-width">'); 
	var interval, id, ismousedown;
	var button = 0;
	jQuery('#toolbar img')
		.mouseenter(function(e) {
			id = jQuery(this).attr('id');
			if(!ismousedown) jQuery(this).css("opacity","0.8");
			else jQuery(this).css("opacity","1.0");
		})
		.mouseout(function(e) {
			clearInterval(interval); 
			jQuery(this).css("opacity","0.5");
		})
		.mousedown(function(e) {
			id = jQuery(this).attr('id');
			ismousedown = true;
			if(e.button==button){
				actionsToolbar(id);
				if(id == "zoomin" || id == "zoomout"){
					interval = setInterval(function(){
						actionsToolbar(id);
					}, 100);
				}
				else {
					clearInterval(interval); 
				}
				jQuery(this).css("opacity","1.0");
				button=0;
			}
		})
		.mouseup(function(e) {
			ismousedown = false;
			if(e.button==button){
				clearInterval(interval); 
				jQuery(this).css("opacity","0.8");
				button=0;
			}
		})
		.on('touchstart', function(e) { 
			button=2;
		})
		.on('touchend', function(e) {
			button=0;
		});
	jQuery('.output-table td:has(.output-text,.output-input)').css("border-radius", "5px").css("background-color", "rgba(125,125,125,0.25)");
	jQuery('#3dhop')
		.on('touchstart pointerdown', function(e) {
			jQuery('#toolbar img').css("opacity","0.5");
		})
		.on('touchend pointerup', function(e) {
			clearInterval(interval); 
		})
		.on('touchmove', function(e) {
			clearInterval(interval); 
			jQuery('#toolbar img').css("opacity","0.5");
		});
	jQuery('#3dhop:not(#draw-canvas)').on('contextmenu', function(e) { return false; });
	jQuery('#draw-canvas')
		.on('contextmenu', function(e) {
			if (!isMobile()) return false; 
		})
		.on('touchstart pointerdown', function(e) {
			jQuery('#toolbar img').css("opacity","0.5");
		})
		.mousedown(function(e) { 
			jQuery('#toolbar img').css("opacity","0.5"); 
			if(e.preventDefault) e.preventDefault(); 
			if (window.getSelection && window.getSelection()!='') window.getSelection().removeAllRanges();
			else if (document.selection && document.selection.createRange()!='') document.selection.empty();
		});
	jQuery(document).on('MSFullscreenChange mozfullscreenchange webkitfullscreenchange', function(e) { 
		if(!document.msFullscreenElement&&!document.mozFullScreen&&!document.webkitIsFullScreen) exitFullscreen();
	});
	if (window.navigator.userAgent.indexOf('Trident/') > 0) { 
		jQuery('#full').click(function() {enterFullscreen();});
		jQuery('#full_on').click(function() {exitFullscreen();});
	}
	jQuery(window).on('resize', function () {
		if (!presenter._resizable) return;
		var width, height;
		if(document.fullscreenElement || document.mozFullScreenElement || document.webkitFullscreenElement ) {
			width = Math.max(document.documentElement.clientWidth, window.innerWidth);
			height = window.innerHeight;
		}
		else {
			width = jQuery('#3dhop').parent().width();
			height = jQuery('#3dhop').parent().height();
		}
		jQuery('#draw-canvas').attr('width', width);
		jQuery('#draw-canvas').attr('height',height);
		jQuery('#3dhop').css('width', width);
		jQuery('#3dhop').css('height', height);
		presenter.ui.postDrawEvent();
	});
	jQuery('.close').mouseenter( function() {
		jQuery('.close').css("display", "none");
		jQuery('.close_on').css("display", "inline");
	});
	jQuery('.close_on').mouseleave( function() {
		jQuery('.close_on').css("display", "none");
		jQuery('.close').css("display", "inline");
	});
	jQuery('#draw-canvas').attr('width', jQuery('#3dhop').parent().width());
	jQuery('#draw-canvas').attr('height',jQuery('#3dhop').parent().height());
	jQuery('#3dhop').css('width', jQuery('#3dhop').parent().width());
	jQuery('#3dhop').css('height', jQuery('#3dhop').parent().height());
	anchorPanels();
	set3dhlg();
}
function init3dhop ( ) { if ( isIOS ( ) ) jQuery ( 'head' ) . append ( '<meta name="viewport" content="width=device-width">' ) ; var interval , id , ismousedown ; var button = 0 ; jQuery ( '#toolbar img' ) . mouseenter ( function ( e ) { id = jQuery ( this ) . attr ( 'id' ) ; if ( ! ismousedown ) jQuery ( this ) . css ( "opacity" , "0.8" ) ; else jQuery ( this ) . css ( "opacity" , "1.0" ) ; } ) . mouseout ( function ( e ) { clearInterval ( interval ) ; jQuery ( this ) . css ( "opacity" , "0.5" ) ; } ) . mousedown ( function ( e ) { id = jQuery ( this ) . attr ( 'id' ) ; ismousedown = true ; if ( e . button == button ) { actionsToolbar ( id ) ; if ( id == "zoomin" || id == "zoomout" ) { interval = setInterval ( function ( ) { actionsToolbar ( id ) ; } , 100 ) ; } else { clearInterval ( interval ) ; } jQuery ( this ) . css ( "opacity" , "1.0" ) ; button = 0 ; } } ) . mouseup ( function ( e ) { ismousedown = false ; if ( e . button == button ) { clearInterval ( interval ) ; jQuery ( this ) . css ( "opacity" , "0.8" ) ; button = 0 ; } } ) . on ( 'touchstart' , function ( e ) { button = 2 ; } ) . on ( 'touchend' , function ( e ) { button = 0 ; } ) ; jQuery ( '.output-table td:has(.output-text,.output-input)' ) . css ( "border-radius" , "5px" ) . css ( "background-color" , "rgba(125,125,125,0.25)" ) ; jQuery ( '#3dhop' ) . on ( 'touchstart pointerdown' , function ( e ) { jQuery ( '#toolbar img' ) . css ( "opacity" , "0.5" ) ; } ) . on ( 'touchend pointerup' , function ( e ) { clearInterval ( interval ) ; } ) . on ( 'touchmove' , function ( e ) { clearInterval ( interval ) ; jQuery ( '#toolbar img' ) . css ( "opacity" , "0.5" ) ; } ) ; jQuery ( '#3dhop:not(#draw-canvas)' ) . on ( 'contextmenu' , function ( e ) { return false ; } ) ; jQuery ( '#draw-canvas' ) . on ( 'contextmenu' , function ( e ) { if ( ! isMobile ( ) ) return false ; } ) . on ( 'touchstart pointerdown' , function ( e ) { jQuery ( '#toolbar img' ) . css ( "opacity" , "0.5" ) ; } ) . mousedown ( function ( e ) { jQuery ( '#toolbar img' ) . css ( "opacity" , "0.5" ) ; if ( e . preventDefault ) e . preventDefault ( ) ; if ( window . getSelection && window . getSelection ( ) != '' ) window . getSelection ( ) . removeAllRanges ( ) ; else if ( document . selection && document . selection . createRange ( ) != '' ) document . selection . empty ( ) ; } ) ; jQuery ( document ) . on ( 'MSFullscreenChange mozfullscreenchange webkitfullscreenchange' , function ( e ) { if ( ! document . msFullscreenElement && ! document . mozFullScreen && ! document . webkitIsFullScreen ) exitFullscreen ( ) ; } ) ; if ( window . navigator . userAgent . indexOf ( 'Trident/' ) > 0 ) { jQuery ( '#full' ) . click ( function ( ) { enterFullscreen ( ) ; } ) ; jQuery ( '#full_on' ) . click ( function ( ) { exitFullscreen ( ) ; } ) ; } jQuery ( window ) . on ( 'resize' , function ( ) { if ( ! presenter . _resizable ) return ; var width , height ; if ( document . fullscreenElement || document . mozFullScreenElement || document . webkitFullscreenElement ) { width = Math . max ( document . documentElement . clientWidth , window . innerWidth ) ; height = window . innerHeight ; } else { width = jQuery ( '#3dhop' ) . parent ( ) . width ( ) ; height = jQuery ( '#3dhop' ) . parent ( ) . height ( ) ; } jQuery ( '#draw-canvas' ) . attr ( 'width' , width ) ; jQuery ( '#draw-canvas' ) . attr ( 'height' , height ) ; jQuery ( '#3dhop' ) . css ( 'width' , width ) ; jQuery ( '#3dhop' ) . css ( 'height' , height ) ; presenter . ui . postDrawEvent ( ) ; } ) ; jQuery ( '.close' ) . mouseenter ( function ( ) { jQuery ( '.close' ) . css ( "display" , "none" ) ; jQuery ( '.close_on' ) . css ( "display" , "inline" ) ; } ) ; jQuery ( '.close_on' ) . mouseleave ( function ( ) { jQuery ( '.close_on' ) . css ( "display" , "none" ) ; jQuery ( '.close' ) . css ( "display" , "inline" ) ; } ) ; jQuery ( '#draw-canvas' ) . attr ( 'width' , jQuery ( '#3dhop' ) . parent ( ) . width ( ) ) ; jQuery ( '#draw-canvas' ) . attr ( 'height' , jQuery ( '#3dhop' ) . parent ( ) . height ( ) ) ; jQuery ( '#3dhop' ) . css ( 'width' , jQuery ( '#3dhop' ) . parent ( ) . width ( ) ) ; jQuery ( '#3dhop' ) . css ( 'height' , jQuery ( '#3dhop' ) . parent ( ) . height ( ) ) ; anchorPanels ( ) ; set3dhlg ( ) ; }
3DHOP - 3D Heritage Online Presenter
Copyright (c) 2014-2020, Visual Computing Lab, ISTI - CNR
All rights reserved.
3DHOP - 3D Heritage Online Presenter Copyright ( c ) 2014 - 2020 Visual Computing Lab ISTI - CNR All rights reserved .
//IOS DEVICES CHECK //MOBILE DEVICES CHECK //fullscreen handler  //IE fullscreen handler 