modif js svg

This commit is contained in:
2018-11-30 15:41:36 +01:00
parent c7b32250df
commit c364f9c04d
47 changed files with 689 additions and 755 deletions
+32 -5
View File
@@ -1,3 +1,31 @@
function disable_zoom() {
(function($) {
$.fn.nodoubletapzoom = function() {
$(this).bind('touchstart', function preventZoom(e) {
var t2 = e.timeStamp
, t1 = $(this).data('lastTouch') || t2
, dt = t2 - t1
, fingers = e.originalEvent.touches.length;
$(this).data('lastTouch', t2);
if (!dt || dt > 500 || fingers > 1) return; // not double-tap
e.preventDefault(); // double tap - prevent the zoom
// also synthesize click events we just swallowed up
$(this).trigger('click').trigger('click');
});
};
})(jQuery);
}
document.addEventListener('gesturestart', function (e) {
e.preventDefault();
});
document.documentElement.addEventListener('touchstart', function (event) {
if (event.touches.length > 1) {
event.preventDefault();
}
}, false);
// Mettre le site en responsive répurerer les valeurs de position en %
// array
@@ -10,8 +38,6 @@ console.log("array_Sh", array_Sh);
console.log("array_Sx", array_Sx);
console.log("array_Sy", array_Sy);
// var
// dimension du navigateur
var Fw = $(window).outerWidth(true);
@@ -50,8 +76,8 @@ function grab() {
function initStart() {
var Start = $('#start').offset()
$(window).animate({ scrollTop: Start.top - ((Fh/2) - (array_Sw[0]/2))}, 0);
$(window).animate({ scrollLeft: Start.left - ((Fw/2) - (array_Sh[0]/2)) }, 0);
$(window).animate({ scrollTop: Start.top - ((Fh/2) - (663.333 / 2))}, 0);
$(window).animate({ scrollLeft: Start.left - ((Fw/2) - (659.633 / 2)) }, 0);
}
function scrollto() {
@@ -79,7 +105,7 @@ function scrollto() {
$(array_Y[0]).click(function(){
var x = array_Sx[1] - ((Fw/2) - (array_Sw[1]/2));
var y = array_Sy[1] - ((Fh/2) - (array_Sh[1]/2));
$(window).scrollTo({top:y, left:47 + '%' },800);
$(window).scrollTo({top:y, left:x },800);
console.log('cc');
});
@@ -189,6 +215,7 @@ function scrollto() {
}
jQuery(document).ready(function($) {
disable_zoom();
grab();
initStart();
scrollto();